Re: Block device interface could use some work

Leonard N. Zubkoff (lnz@dandelion.com)
Tue, 5 Nov 1996 15:25:39 -0800


Date: Mon, 4 Nov 1996 09:30:35 -0500
From: "Theodre Ts'o" <tytso@mit.edu>

Unfortunately (at least for this analysis), the high-level code tries to
merge adjacent requests for performance reasons. Hence, a request may
span a large number of blocks. If there is a bad block is in a middle
of a multi-block request, all of the blocks associated in the
multi-block request will be marked as being in error, even ones which
(a) were in fact successfully read, and (b) those which could have been
successfully read if the device driver had actually tried to read them.

The SCSI disk driver now attempts to handle this case correctly, calling
end_request for success with the blocks that were OK, with failure for the ones
that didn't, and then retries the remainder. It's not pretty...

Leonard