Skip to content

Commit 0ee4bbe

Browse files
YuKuai-huaweivijay-suman
authored andcommitted
md/md-bitmap: fix dm-raid max_write_behind setting
[ Upstream commit 2afe177 ] It's supposed to be COUNTER_MAX / 2, not COUNTER_MAX. Link: https://lore.kernel.org/linux-raid/20250524061320.370630-14-yukuai1@huaweicloud.com Signed-off-by: Yu Kuai <yukuai3@huawei.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Sasha Levin <sashal@kernel.org> (cherry picked from commit 8ddce5eab6c364cdbfadf87164627c3ab7e63a76) Signed-off-by: Vijayendra Suman <vijayendra.suman@oracle.com>
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)