From: Stefan Bader Date: Thu, 2 Feb 2006 22:28:07 +0000 (-0800) Subject: [PATCH] device-mapper log bitset: fix big endian find_next_zero_bit X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=1113a7e92e483074c6235da59460759e33b9b144;p=openwrt%2Fstaging%2Fblogic.git [PATCH] device-mapper log bitset: fix big endian find_next_zero_bit 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. Signed-off-by: Stefan Bader Signed-off-by: Alasdair G Kergon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/md/dm-log.c b/drivers/md/dm-log.c index 74039db846ba..d73779a42417 100644 --- a/drivers/md/dm-log.c +++ b/drivers/md/dm-log.c @@ -545,7 +545,8 @@ static int core_get_resync_work(struct dirty_log *log, region_t *region) 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;