aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
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}