public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [bug] infinite loop in generic_make_request()
@ 2000-11-30  7:02 V Ganesh
  2000-11-30  9:24 ` [PATCH] " Neil Brown
  0 siblings, 1 reply; 6+ messages in thread
From: V Ganesh @ 2000-11-30  7:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-LVM, mingo

[cc'ed to maintainers of md and lvm]

hi,
in generic_make_request(), the following code handles stacking:

do {
       q = blk_get_queue(bh->b_rdev);
       if (!q) {
                        printk(...)
                        buffer_IO_error(bh);
                        break;
       }
} while (q->make_request_fn(q, rw, bh));

however, make_request_fn may return -1 in case of errors. one such fn is
raid0_make_request(). this causes generic_make_request() to loop endlessly.
lvm returns 1 unconditionally, so it would also loop if an error occured in
lvm_map(). other bdevs might have the same problem.
I think a better mechanism would be to mandate that make_request_fn ought
to call bh->b_end_io() in case of errors and return 0.

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2000-11-30 22:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-11-30  7:02 [bug] infinite loop in generic_make_request() V Ganesh
2000-11-30  9:24 ` [PATCH] " Neil Brown
2000-11-30 20:05   ` Andreas Dilger
2000-11-30 20:41     ` Andrea Arcangeli
2000-11-30 21:54       ` Andreas Dilger
2000-11-30 22:17         ` Andrea Arcangeli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox