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.28-rc3-devel/drivers/md/dm-snap.c =================================================================== --- linux-2.6.28-rc3-devel.orig/drivers/md/dm-snap.c 2008-11-05 09:03:10.000000000 +0100 +++ linux-2.6.28-rc3-devel/drivers/md/dm-snap.c 2008-11-05 09:03:13.000000000 +0100 @@ -1358,6 +1358,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);