Messages in this thread |  | | Date | Thu, 7 Nov 1996 14:28:48 -0500 | From | "Theodore Y. Ts'o" <> | Subject | Re: Block device interface could use some work |
| |
Date: Thu, 7 Nov 1996 10:57:22 -0600 From: "Ray Van Tassle-CRV004" <Ray_Van_Tassle-CRV004@email.mot.com>
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.
That would be the right answer, except that end_request() doesn't know which blocks were read in correctly, and which blocks failed. The device driver needs to give an indication of how far in the read or write request it got before it found a failure, and then have end_request reissue those blocks that haven't yet been read.
The "quick hack" alternative which wouldn't require making changes to all of the block device drivers would be to change end_request() that when there's an error in a multi-block request, it breaks apart the request into individual requests, and then retries them *all*, since it doesn't know which block failed. This would really slow down reads in the face of errors, but at least it's correct.
However, if the plan is to rewrite the entire block device interface anyway, we might as well do it right instead of putting in a kludge.
- Ted
|  |