Don't insert before existing chunk into the hash. Snapshot merging couldn't handle it. And this code is used very rarely anyway (most inserts are after existing extent, not before). Signed-off-by: Mikulas Patocka --- drivers/md/dm-snap.c | 10 ---------- 1 file changed, 10 deletions(-) Index: linux-2.6.28-rc5-devel/drivers/md/dm-snap.c =================================================================== --- linux-2.6.28-rc5-devel.orig/drivers/md/dm-snap.c 2008-11-25 16:10:58.000000000 +0100 +++ linux-2.6.28-rc5-devel/drivers/md/dm-snap.c 2008-11-25 16:11:03.000000000 +0100 @@ -405,16 +405,6 @@ static void insert_completed_exception(s return; } - /* Insert before an existing chunk? */ - if (new_e->old_chunk == (e->old_chunk - 1) && - new_e->new_chunk == (dm_chunk_number(e->new_chunk) - 1)) { - dm_consecutive_chunk_count_inc(e); - e->old_chunk--; - e->new_chunk--; - free_exception(new_e); - return; - } - if (new_e->old_chunk > e->old_chunk) break; }