diff options
author | Jens Axboe <axboe@suse.de> | 2004-08-04 22:13:29 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-08-04 22:13:29 -0700 |
commit | 1cc9f865f84b3beab883ccaeb6a61a65421a97b1 (patch) | |
tree | 13f7cc285bd2c0bff17750818299bf449d490de9 /drivers | |
parent | 9c66cd06781f575c5b316d2f1c358beceefb011e (diff) | |
download | history-1cc9f865f84b3beab883ccaeb6a61a65421a97b1.tar.gz |
[PATCH] multipath readahead fix
For requests marked read-ahead, it can legitimately fail without it being a
path problem. So don't fail a path just because this happens (can be the
atomic request allocation going nuts, for instance), or all paths will
quickly go away.
Cc: <neilb@cse.unsw.edu.au>
Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/md/multipath.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/md/multipath.c b/drivers/md/multipath.c index c5ee056c0ef97e..a9df710daa524f 100644 --- a/drivers/md/multipath.c +++ b/drivers/md/multipath.c @@ -120,7 +120,7 @@ int multipath_end_request(struct bio *bio, unsigned int bytes_done, int error) if (uptodate) multipath_end_bh_io(mp_bh, uptodate); - else { + else if ((bio->bi_rw & (1 << BIO_RW_AHEAD)) == 0) { /* * oops, IO error: */ @@ -130,7 +130,8 @@ int multipath_end_request(struct bio *bio, unsigned int bytes_done, int error) bdevname(rdev->bdev,b), (unsigned long long)bio->bi_sector); multipath_reschedule_retry(mp_bh); - } + } else + multipath_end_bh_io(mp_bh, 0); rdev_dec_pending(rdev, conf->mddev); return 0; } |