Don't insert before existing chunk into the hash. This code branch is never used (because exceptions are allocated consecutevely) and if it were used, it would break snapshot merging. Signed-off-by: Mikulas Patocka --- drivers/md/dm-snap.c | 10 ---------- 1 file changed, 10 deletions(-) Index: linux-2.6.26-fast/drivers/md/dm-snap.c =================================================================== --- linux-2.6.26-fast.orig/drivers/md/dm-snap.c 2008-07-22 14:49:54.000000000 +0200 +++ linux-2.6.26-fast/drivers/md/dm-snap.c 2008-07-22 14:50:02.000000000 +0200 @@ -394,16 +394,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; }