end_request error procedure in 2.5?

From: Peter T. Breuer (ptb@it.uc3m.es)
Date: Mon Sep 16 2002 - 08:49:42 EST

Can someone tell me why this block end_request routine works fine with a
request that isn't errored, but locks the machine a milisecond or two
later if the request is marked for erroring?

call as

 end_request( req, (req->errors == 0) ? 1 : 0 );

 static void end_request(struct request *req, int uptodate) {
 struct bio *bio;
 while ((bio = req->bio) != NULL) {
             req->bio = bio->bi_next;
             bio->bi_next = NULL;
             bio_endio(bio, uptodate);

It works fine except on error. Kernel 2.5.31. I understand that
put_request adds the request back to a free list (if gotten from there
via get_request). The request is ordinary, except out of range ...
it's produced by an e2fsck of the device when the device itself is
unformatted, and the out of range request gets passed to the driver and
is errored there, and "kapow" ..

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

This archive was generated by hypermail 2b29 : Mon Sep 23 2002 - 22:00:16 EST