Re: Block device interface could use some work

Ray Van Tassle-CRV004 (Ray_Van_Tassle-CRV004@email.mot.com)
Thu, 7 Nov 1996 10:57:22 -0600


> 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...

Given that errors are rare (at least, they had BETTER be rare!), why not
just re-issue the requests, but (somehow) prevent them from being merged.
You _don't_ need to optimize for the error case, as long as you handle it
properly.
>
> Leonard