[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>
This commit is contained in:

committed by
Linus Torvalds

parent
3f603ed319
commit
f6a80ea8ed
@@ -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) {
|
||||
|
Reference in New Issue
Block a user