Skip to content

Commit 2afe177

Browse files
committed
md/md-bitmap: fix dm-raid max_write_behind setting
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>
1 parent 9f346f7 commit 2afe177

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/md/md-bitmap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,7 @@ static int md_bitmap_new_disk_sb(struct bitmap *bitmap)
789789
* is a good choice? We choose COUNTER_MAX / 2 arbitrarily.
790790
*/
791791
write_behind = bitmap->mddev->bitmap_info.max_write_behind;
792-
if (write_behind > COUNTER_MAX)
792+
if (write_behind > COUNTER_MAX / 2)
793793
write_behind = COUNTER_MAX / 2;
794794
sb->write_behind = cpu_to_le32(write_behind);
795795
bitmap->mddev->bitmap_info.max_write_behind = write_behind;

0 commit comments

Comments
 (0)