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 --- drivers/md/dm-snap.c | 5 +++++ 1 file changed, 5 insertions(+) Index: linux-2.6.26-devel/drivers/md/dm-snap.c =================================================================== --- linux-2.6.26-devel.orig/drivers/md/dm-snap.c 2008-07-14 20:24:03.000000000 +0200 +++ linux-2.6.26-devel/drivers/md/dm-snap.c 2008-07-14 20:24:18.000000000 +0200 @@ -1339,6 +1339,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);