Re: linux-kernel-digest V1 #118

Drew Eckhardt (drew@poohsticks.org)
Mon, 24 Jul 1995 02:13:54 -0600


In message <199507191422.QAA00096@rsx-11.mit.edu>, tytso@mit.edu writes:
> From: linux@pe1chl.ampr.org (Rob Janssen reading Linux mailinglist)
> Date: Tue, 18 Jul 1995 09:18:15 +0200 (MET DST)
>
> Resilience to disk errors certainly isn't Linux's best point...
> I while ago I had some bad sectors on my SCSI disk (which does not have
> automatic re-allocation of those bad sectors), and it was quite difficult
> to recover from that.
>
>It would be nice to allow filesystems to automatically move bad sectors
>to the bad block list, and possibly rewrite a block buffer to a newly
>reallocated block when it is discovered that a newly allocated block is
>bad. This would probably require a callback from the device driver to
>the filesystem layer to notify the filesystem that a particular block is
>bad.
>
>It's not done yet; but it would be a good thing to do.

Actually, this can and should be handled in the SCSI disk driver. SCSI disks
know when they had a soft-error condition, and post-SCSI I CCS drives can
be programmed to report those recovered errors to you via the ERROR RECOVERY
mode page. You can then tell the SCSI disk to forward the bad blocks using
the REASSIGN BLOCKS command.

sd_init_onedisk() should probably change to flip the bit if it is
flippable; the mid-level code needs to change so that this gets passed
up to the higher level code; and rw_intr() needs to deal with this.