[PATCH] dm: Handle READA requests in dm-mpath.c
authorLars Marowsky-Bree <lmb@suse.de>
Wed, 8 Jun 2005 22:50:31 +0000 (15:50 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Wed, 8 Jun 2005 23:21:14 +0000 (16:21 -0700)
READA errors failing with EWOULDBLOCK/EAGAIN do not constitute a valid
reason for failing the path; this lead to erratic errors on DM multipath
devices.  This error can be safely propagated upwards without failing the
path.

Acked-by: Kevin Corry <kevcorry@us.ibm.com>
Acked-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Lars Marowsky-Bree <lmb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/md/dm-mpath.c

index 1e97b3c12bd5dae147963fa7331ae3512554538d..0c1b8520ef86f9105c20b45632eb00d9a114c8be 100644 (file)
@@ -985,6 +985,9 @@ static int do_end_io(struct multipath *m, struct bio *bio,
        if (!error)
                return 0;       /* I/O complete */
 
+       if ((error == -EWOULDBLOCK) && bio_rw_ahead(bio))
+               return error;
+
        spin_lock(&m->lock);
        if (!m->nr_valid_paths) {
                if (!m->queue_if_no_path || m->suspended) {