Skip to content

Commit 0ee4bbe

Browse files
YuKuai-huaweivijay-suman
authored andcommitted
md/md-bitmap: fix dm-raid max_write_behind setting
[ Upstream commit 2afe17794cfed5f80295b1b9facd66e6f65e5002 ] It's supposed to be COUNTER_MAX / 2, not COUNTER_MAX. Link: https://lore.kernel.org/linux-raid/[email protected] Signed-off-by: Yu Kuai <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Sasha Levin <[email protected]> (cherry picked from commit 8ddce5eab6c364cdbfadf87164627c3ab7e63a76) Signed-off-by: Vijayendra Suman <[email protected]>
1 parent 8208396 commit 0ee4bbe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/md/md-bitmap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ static int md_bitmap_new_disk_sb(struct bitmap *bitmap)
546546
* is a good choice? We choose COUNTER_MAX / 2 arbitrarily.
547547
*/
548548
write_behind = bitmap->mddev->bitmap_info.max_write_behind;
549-
if (write_behind > COUNTER_MAX)
549+
if (write_behind > COUNTER_MAX / 2)
550550
write_behind = COUNTER_MAX / 2;
551551
sb->write_behind = cpu_to_le32(write_behind);
552552
bitmap->mddev->bitmap_info.max_write_behind = write_behind;

0 commit comments

Comments
 (0)