If dispatching write request to merging snapshot device directly to the origin (because the chunk is not remapped or was already merged), we must make exceptions in other snapshots. Signed-off-by: Mikulas Patocka Reviewed-by: Mike Snitzer --- drivers/md/dm-snap.c | 5 +++++ 1 file changed, 5 insertions(+) Index: linux-2.6.31-fast-new-2/drivers/md/dm-snap.c =================================================================== --- linux-2.6.31-fast-new-2.orig/drivers/md/dm-snap.c 2009-10-16 21:48:42.000000000 +0200 +++ linux-2.6.31-fast-new-2/drivers/md/dm-snap.c 2009-10-16 21:48:45.000000000 +0200 @@ -1531,6 +1531,11 @@ static int snapshot_merge_map(struct dm_ bio->bi_bdev = s->origin->bdev; + if (bio_rw(bio) == WRITE) { + up_write(&s->lock); + return do_origin(s->origin, bio); + } + out_unlock: up_write(&s->lock);