dm-log.c: Use ext2_find_next_zero_bit()
PATCH 1/1 dm-log.c: Use ext2_find_next_zero_bit()
Hi,
This patch will replace the find_next_zero_bit function with the appropriate ext2 counterpart. Without this on 64 bit BE machines the mirror target will try to recover regions beyond the end of device.
Regards,
Stefan
From: Stefan Bader <[email protected]>
This is an addition to the endian fixes that introduce ext2_* versions of the set and clear bit functions. The find_next_zero_bit also has to be the ext2 one. Otherwise the mirror target tries to recover non-existent regions beyond the end of device.
Signed-off-by Stefan Bader <[email protected]>
drivers/md/dm-log.c +2 -1
@@ -545,7 +545,8 @@ static int core_get_resync_work(struct dreturn 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;