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-rc5-devel/drivers/md/dm-snap.c =================================================================== --- linux-2.6.26-rc5-devel.orig/drivers/md/dm-snap.c 2008-06-17 01:19:53.000000000 +0200 +++ linux-2.6.26-rc5-devel/drivers/md/dm-snap.c 2008-06-17 01:19:59.000000000 +0200 @@ -1360,6 +1360,11 @@ 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);