diff options
author | Alasdair G Kergon <agk@redhat.com> | 2006-02-01 06:04:55 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-01 11:53:11 -0500 |
commit | 4aac0a63fe8d418a2b74e43708f59380ba379a3b (patch) | |
tree | b71c432edf274776443a27d5dfdbd7800d014e08 /drivers | |
parent | 3eaf840e0b0046f56602c524c7ba58a82f5526c5 (diff) |
[PATCH] device-mapper snapshot: barriers not supported
The snapshot and origin targets are incapable of handling barriers and need to
indicate this.
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')
-rw-r--r-- | drivers/md/dm-snap.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c index ad9b61f16c5e..f3759dd7828e 100644 --- a/drivers/md/dm-snap.c +++ b/drivers/md/dm-snap.c | |||
@@ -792,6 +792,9 @@ static int snapshot_map(struct dm_target *ti, struct bio *bio, | |||
792 | if (!s->valid) | 792 | if (!s->valid) |
793 | return -EIO; | 793 | return -EIO; |
794 | 794 | ||
795 | if (unlikely(bio_barrier(bio))) | ||
796 | return -EOPNOTSUPP; | ||
797 | |||
795 | /* | 798 | /* |
796 | * Write to snapshot - higher level takes care of RW/RO | 799 | * Write to snapshot - higher level takes care of RW/RO |
797 | * flags so we should only get this if we are | 800 | * flags so we should only get this if we are |
@@ -1058,6 +1061,9 @@ static int origin_map(struct dm_target *ti, struct bio *bio, | |||
1058 | struct dm_dev *dev = (struct dm_dev *) ti->private; | 1061 | struct dm_dev *dev = (struct dm_dev *) ti->private; |
1059 | bio->bi_bdev = dev->bdev; | 1062 | bio->bi_bdev = dev->bdev; |
1060 | 1063 | ||
1064 | if (unlikely(bio_barrier(bio))) | ||
1065 | return -EOPNOTSUPP; | ||
1066 | |||
1061 | /* Only tell snapshots if this is a write */ | 1067 | /* Only tell snapshots if this is a write */ |
1062 | return (bio_rw(bio) == WRITE) ? do_origin(dev, bio) : 1; | 1068 | return (bio_rw(bio) == WRITE) ? do_origin(dev, bio) : 1; |
1063 | } | 1069 | } |