aboutsummaryrefslogtreecommitdiff
path: root/drivers/md/dm.c
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2009-04-09 00:27:13 +0100
committerAlasdair G Kergon <agk@redhat.com>2009-04-09 00:27:13 +0100
commit692d0eb9e02cf81fb387ff891f53840db2f3110a (patch)
tree0e6aa42d81cd47c55de37b55d2ffad419fe57cd0 /drivers/md/dm.c
parent9c47008d13add50ec4597a8b9eee200c515282c8 (diff)
dm: remove limited barrier support
Prepare for full barrier implementation: first remove the restricted support. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm.c')
-rw-r--r--drivers/md/dm.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 25d86e2c01f..ab3b5d84df6 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -851,11 +851,7 @@ static void __split_and_process_bio(struct mapped_device *md, struct bio *bio)
bio_io_error(bio);
return;
}
- if (unlikely(bio_barrier(bio) && !dm_table_barrier_ok(ci.map))) {
- dm_table_put(ci.map);
- bio_endio(bio, -EOPNOTSUPP);
- return;
- }
+
ci.md = md;
ci.bio = bio;
ci.io = alloc_io(md);
@@ -937,6 +933,15 @@ static int dm_request(struct request_queue *q, struct bio *bio)
struct mapped_device *md = q->queuedata;
int cpu;
+ /*
+ * There is no use in forwarding any barrier request since we can't
+ * guarantee it is (or can be) handled by the targets correctly.
+ */
+ if (unlikely(bio_barrier(bio))) {
+ bio_endio(bio, -EOPNOTSUPP);
+ return 0;
+ }
+
down_read(&md->io_lock);
cpu = part_stat_lock();