Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 19330
b: refs/heads/master
c: 4aac0a6
h: refs/heads/master
v: v3
  • Loading branch information
Alasdair G Kergon authored and Linus Torvalds committed Feb 1, 2006
1 parent e1e9454 commit 5e4c728
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3eaf840e0b0046f56602c524c7ba58a82f5526c5
refs/heads/master: 4aac0a63fe8d418a2b74e43708f59380ba379a3b
6 changes: 6 additions & 0 deletions trunk/drivers/md/dm-snap.c
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,9 @@ static int snapshot_map(struct dm_target *ti, struct bio *bio,
if (!s->valid)
return -EIO;

if (unlikely(bio_barrier(bio)))
return -EOPNOTSUPP;

/*
* Write to snapshot - higher level takes care of RW/RO
* flags so we should only get this if we are
Expand Down Expand Up @@ -1058,6 +1061,9 @@ static int origin_map(struct dm_target *ti, struct bio *bio,
struct dm_dev *dev = (struct dm_dev *) ti->private;
bio->bi_bdev = dev->bdev;

if (unlikely(bio_barrier(bio)))
return -EOPNOTSUPP;

/* Only tell snapshots if this is a write */
return (bio_rw(bio) == WRITE) ? do_origin(dev, bio) : 1;
}
Expand Down

0 comments on commit 5e4c728

Please sign in to comment.