Re: plugging in 2.4. Does it work?

From: Peter T. Breuer (
Date: Wed Feb 21 2001 - 12:54:38 EST

"A month of sundays ago Jens Axboe wrote:"
> The implementation in ll_rw_blk.c (and other places) assumes that
> a failed request just means the first chunk and it then makes sense
> to just end i/o on that buffer and resetup the request for the next
> buffer. If you want to completely scrap the request on an error, then
> you'll just have to do that manually (ie loop end_that_request_first
> and end_that_request_last at the end).
> void my_end_request(struct request *rq, int uptodate)
> {
> while (end_that_request_first(rq, uptodate))
> ;
> io_lock
> end_that_request_last(rq);
> io_unlock
> }

OK, thanks!

> And why you keep insisting on a duplicate end_that_request_first I don't
> know?!

Backwards compatibility. The code has to keep working under older
kernel versions too in order to pass the regression tests, and the
simplest thing is to put the front while loop in an ifdef while I work
on it. At some stage soon I'll do as you want. Things have stopped
oopsing on write now, and I've sent it for testing.

That's also why I have the io_lock around the whole code instead of
only the last part. I have to put it around something that at least
existed in 2.2 and even 2.0. I've stepped the version number and will
be revising the code while its being tested. But thanks for the
concern :-). I appreciate it!


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Fri Feb 23 2001 - 21:00:25 EST