diff options
author | Alasdair G Kergon <agk@redhat.com> | 2005-07-13 00:53:01 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-13 01:19:10 +0200 |
commit | f6a80ea8ed44de0b19c42d41928be37a186a3f41 (patch) | |
tree | 2e565669d042e54576a4beaba03145ea35ec2145 /drivers/md | |
parent | Merge master.kernel.org:/pub/scm/linux/kernel/git/lenb/linux-2.6 (diff) | |
download | linux-f6a80ea8ed44de0b19c42d41928be37a186a3f41.tar.xz linux-f6a80ea8ed44de0b19c42d41928be37a186a3f41.zip |
[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/md')
-rw-r--r-- | drivers/md/dm-mpath.c | 6 | ||||
-rw-r--r-- | drivers/md/dm-snap.c | 2 | ||||
-rw-r--r-- | drivers/md/dm.c | 2 |
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, struct mpath_io *mpio; struct multipath *m = (struct multipath *) ti->private; + if (bio_barrier(bio)) + return -EOPNOTSUPP; + mpio = mempool_alloc(m->mpio_pool, GFP_NOIO); dm_bio_record(&mpio->details, bio); @@ -988,6 +991,9 @@ static int do_end_io(struct multipath *m, struct bio *bio, if ((error == -EWOULDBLOCK) && bio_rw_ahead(bio)) return error; + if (error == -EOPNOTSUPP) + return error; + spin_lock(&m->lock); if (!m->nr_valid_paths) { 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, /* Full snapshots are not usable */ if (!s->valid) - return -1; + return -EIO; /* * 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, /* error the io and bail out */ struct dm_io *io = tio->io; free_tio(tio->io->md, tio); - dec_pending(io, -EIO); + dec_pending(io, r); bio_put(clone); } } |