aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlasdair G Kergon <agk@redhat.com>2005-07-12 18:53:01 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-12 19:19:10 -0400
commitf6a80ea8ed44de0b19c42d41928be37a186a3f41 (patch)
tree2e565669d042e54576a4beaba03145ea35ec2145 /drivers
parent3f603ed319d5120e883e64ac5967b2fc848fc43b (diff)
[PATCH] device-mapper multipath: Barriers not supported
dm multipath will report barriers as not supported with this patch. Signed-off-by: Lars Marowsky-Bree <lmb@suse.de> Signed-off-by: Alasdair G Kergon <agk@redhat.com> 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/dm-mpath.c6
-rw-r--r--drivers/md/dm-snap.c2
-rw-r--r--drivers/md/dm.c2
3 files changed, 8 insertions, 2 deletions
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index 0c1b8520ef86..84cdb700a247 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -765,6 +765,9 @@ static int multipath_map(struct dm_target *ti, struct bio *bio,
765 struct mpath_io *mpio; 765 struct mpath_io *mpio;
766 struct multipath *m = (struct multipath *) ti->private; 766 struct multipath *m = (struct multipath *) ti->private;
767 767
768 if (bio_barrier(bio))
769 return -EOPNOTSUPP;
770
768 mpio = mempool_alloc(m->mpio_pool, GFP_NOIO); 771 mpio = mempool_alloc(m->mpio_pool, GFP_NOIO);
769 dm_bio_record(&mpio->details, bio); 772 dm_bio_record(&mpio->details, bio);
770 773
@@ -988,6 +991,9 @@ static int do_end_io(struct multipath *m, struct bio *bio,
988 if ((error == -EWOULDBLOCK) && bio_rw_ahead(bio)) 991 if ((error == -EWOULDBLOCK) && bio_rw_ahead(bio))
989 return error; 992 return error;
990 993
994 if (error == -EOPNOTSUPP)
995 return error;
996
991 spin_lock(&m->lock); 997 spin_lock(&m->lock);
992 if (!m->nr_valid_paths) { 998 if (!m->nr_valid_paths) {
993 if (!m->queue_if_no_path || m->suspended) { 999 if (!m->queue_if_no_path || m->suspended) {
diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c
index 7e691ab9a748..594d1f6b4789 100644
--- a/drivers/md/dm-snap.c
+++ b/drivers/md/dm-snap.c
@@ -777,7 +777,7 @@ static int snapshot_map(struct dm_target *ti, struct bio *bio,
777 777
778 /* Full snapshots are not usable */ 778 /* Full snapshots are not usable */
779 if (!s->valid) 779 if (!s->valid)
780 return -1; 780 return -EIO;
781 781
782 /* 782 /*
783 * Write to snapshot - higher level takes care of RW/RO 783 * Write to snapshot - higher level takes care of RW/RO
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index f6b03957efc7..5d40555b42ba 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -384,7 +384,7 @@ static void __map_bio(struct dm_target *ti, struct bio *clone,
384 /* error the io and bail out */ 384 /* error the io and bail out */
385 struct dm_io *io = tio->io; 385 struct dm_io *io = tio->io;
386 free_tio(tio->io->md, tio); 386 free_tio(tio->io->md, tio);
387 dec_pending(io, -EIO); 387 dec_pending(io, r);
388 bio_put(clone); 388 bio_put(clone);
389 } 389 }
390} 390}