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/[email protected] Signed-off-by: Yu Kuai <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]>
1 parent 9f346f7 commit 2afe177

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
@@ -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)