Skip to contentSkip to conversation

device-mapper log bitset: fix big endian find_next_zero_bit

PATCH Alasdair G Kergon 1 participant 1 message Feb 1, 2006 Device mapper

lore
Share & tools
lore

Alasdair G Kergon

author maintainer
#0 lore raw

From: Stefan Bader <[email protected]>

This is a fix to the device-mapper-log-bitset-fix-endian patch that switched to ext2_* versions of the set and clear bit functions. The find_next_zero_bit function also has to be the ext2 one. Otherwise the mirror target tries to recover non-existent regions beyond the end of device.

drivers/md/dm-log.c +2 -1
Index: linux-2.6.16-rc1/drivers/md/dm-log.c
===================================================================
@@ -545,7 +545,8 @@ static int core_get_resync_work(struct d
 		return 0;
 
 	do {
-		*region = find_next_zero_bit((unsigned long *) lc->sync_bits,
+		*region = ext2_find_next_zero_bit(
+					     (unsigned long *) lc->sync_bits,
 					     lc->region_count,
 					     lc->sync_search);
 		lc->sync_search = *region + 1;