From: Guoqing Jiang <gqjiang@xxxxxxxx> The bm_blocks is modified by commit fe60ce (md/bitmap: use sector_div for sector_t divisions), but it makes bm_blocks has different value which is changed from like "a/b" to "a%b", need to correct this to make sure cluster-md still works. Signed-off-by: Guoqing Jiang <gqjiang@xxxxxxxx> --- This is against for-next branch. drivers/md/bitmap.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c index 501f83f..ea9c685 100644 --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c @@ -571,11 +571,10 @@ static int bitmap_read_sb(struct bitmap *bitmap) re_read: /* If cluster_slot is set, the cluster is setup */ if (bitmap->cluster_slot >= 0) { - sector_t bm_blocks; - sector_t resync_sectors = bitmap->mddev->resync_max_sectors; + sector_t bm_blocks = bitmap->mddev->resync_max_sectors; - bm_blocks = sector_div(resync_sectors, - bitmap->mddev->bitmap_info.chunksize >> 9); + sector_div(bm_blocks, + bitmap->mddev->bitmap_info.chunksize >> 9); bm_blocks = bm_blocks << 3; bm_blocks = DIV_ROUND_UP_SECTOR_T(bm_blocks, 4096); bitmap->mddev->bitmap_info.offset += bitmap->cluster_slot * (bm_blocks << 3); -- 1.7.12.4 -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html