diff options
-rw-r--r-- | drivers/md/dm-crypt.c | 3 | ||||
-rw-r--r-- | drivers/md/dm-mpath.c | 3 | ||||
-rw-r--r-- | drivers/md/dm-snap.c | 6 | ||||
-rw-r--r-- | drivers/md/dm.c | 9 |
4 files changed, 9 insertions, 12 deletions
diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index ece7c7c4cdbb..ba952a032598 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c | |||
@@ -941,9 +941,6 @@ static int crypt_map(struct dm_target *ti, struct bio *bio, | |||
941 | struct crypt_config *cc = ti->private; | 941 | struct crypt_config *cc = ti->private; |
942 | struct dm_crypt_io *io; | 942 | struct dm_crypt_io *io; |
943 | 943 | ||
944 | if (bio_barrier(bio)) | ||
945 | return -EOPNOTSUPP; | ||
946 | |||
947 | io = mempool_alloc(cc->io_pool, GFP_NOIO); | 944 | io = mempool_alloc(cc->io_pool, GFP_NOIO); |
948 | io->target = ti; | 945 | io->target = ti; |
949 | io->base_bio = bio; | 946 | io->base_bio = bio; |
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index fc6c1021178d..d6ca9d0a6fd1 100644 --- a/drivers/md/dm-mpath.c +++ b/drivers/md/dm-mpath.c | |||
@@ -798,9 +798,6 @@ static int multipath_map(struct dm_target *ti, struct bio *bio, | |||
798 | struct dm_mpath_io *mpio; | 798 | struct dm_mpath_io *mpio; |
799 | struct multipath *m = (struct multipath *) ti->private; | 799 | struct multipath *m = (struct multipath *) ti->private; |
800 | 800 | ||
801 | if (bio_barrier(bio)) | ||
802 | return -EOPNOTSUPP; | ||
803 | |||
804 | mpio = mempool_alloc(m->mpio_pool, GFP_NOIO); | 801 | mpio = mempool_alloc(m->mpio_pool, GFP_NOIO); |
805 | dm_bio_record(&mpio->details, bio); | 802 | dm_bio_record(&mpio->details, bio); |
806 | 803 | ||
diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c index 854891d07b59..83ddbfe6b8a4 100644 --- a/drivers/md/dm-snap.c +++ b/drivers/md/dm-snap.c | |||
@@ -889,9 +889,6 @@ static int snapshot_map(struct dm_target *ti, struct bio *bio, | |||
889 | if (!s->valid) | 889 | if (!s->valid) |
890 | return -EIO; | 890 | return -EIO; |
891 | 891 | ||
892 | if (unlikely(bio_barrier(bio))) | ||
893 | return -EOPNOTSUPP; | ||
894 | |||
895 | /* FIXME: should only take write lock if we need | 892 | /* FIXME: should only take write lock if we need |
896 | * to copy an exception */ | 893 | * to copy an exception */ |
897 | down_write(&s->lock); | 894 | down_write(&s->lock); |
@@ -1162,9 +1159,6 @@ static int origin_map(struct dm_target *ti, struct bio *bio, | |||
1162 | struct dm_dev *dev = ti->private; | 1159 | struct dm_dev *dev = ti->private; |
1163 | bio->bi_bdev = dev->bdev; | 1160 | bio->bi_bdev = dev->bdev; |
1164 | 1161 | ||
1165 | if (unlikely(bio_barrier(bio))) | ||
1166 | return -EOPNOTSUPP; | ||
1167 | |||
1168 | /* Only tell snapshots if this is a write */ | 1162 | /* Only tell snapshots if this is a write */ |
1169 | return (bio_rw(bio) == WRITE) ? do_origin(dev, bio) : DM_MAPIO_REMAPPED; | 1163 | return (bio_rw(bio) == WRITE) ? do_origin(dev, bio) : DM_MAPIO_REMAPPED; |
1170 | } | 1164 | } |
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index b5e56af8f85a..f4f7d35561ab 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c | |||
@@ -800,6 +800,15 @@ static int dm_request(request_queue_t *q, struct bio *bio) | |||
800 | int rw = bio_data_dir(bio); | 800 | int rw = bio_data_dir(bio); |
801 | struct mapped_device *md = q->queuedata; | 801 | struct mapped_device *md = q->queuedata; |
802 | 802 | ||
803 | /* | ||
804 | * There is no use in forwarding any barrier request since we can't | ||
805 | * guarantee it is (or can be) handled by the targets correctly. | ||
806 | */ | ||
807 | if (unlikely(bio_barrier(bio))) { | ||
808 | bio_endio(bio, bio->bi_size, -EOPNOTSUPP); | ||
809 | return 0; | ||
810 | } | ||
811 | |||
803 | down_read(&md->io_lock); | 812 | down_read(&md->io_lock); |
804 | 813 | ||
805 | disk_stat_inc(dm_disk(md), ios[rw]); | 814 | disk_stat_inc(dm_disk(md), ios[rw]); |