Fix the 'sizeof' in the region log bitmap size calculation: it's uint32_t, not unsigned long. Signed-Off-By: Alasdair G Kergon Index: linux-2.6.17/drivers/md/dm-log.c =================================================================== --- linux-2.6.17.orig/drivers/md/dm-log.c 2006-06-21 17:17:55.000000000 +0100 +++ linux-2.6.17/drivers/md/dm-log.c 2006-06-21 17:17:56.000000000 +0100 @@ -295,10 +295,10 @@ static int create_log_context(struct dir * Work out how many "unsigned long"s we need to hold the bitset. */ bitset_size = dm_round_up(region_count, - sizeof(unsigned long) << BYTE_SHIFT); + sizeof(*lc->clean_bits) << BYTE_SHIFT); bitset_size >>= BYTE_SHIFT; - lc->bitset_uint32_count = bitset_size / 4; + lc->bitset_uint32_count = bitset_size / sizeof(*lc->clean_bits); /* * Disk log?