aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorYu Kuai <yukuai3@huawei.com>2025-05-24 14:13:10 +0800
committerYu Kuai <yukuai3@huawei.com>2025-05-30 15:47:23 +0800
commit2afe17794cfed5f80295b1b9facd66e6f65e5002 (patch)
treecd476519acc18a2f22a26414b5ebb130a6efcda8
parentmd/raid1,raid10: don't handle IO error for REQ_RAHEAD and REQ_NOWAIT (diff)
downloadwireguard-linux-2afe17794cfed5f80295b1b9facd66e6f65e5002.tar.xz
wireguard-linux-2afe17794cfed5f80295b1b9facd66e6f65e5002.zip
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>
-rw-r--r--drivers/md/md-bitmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/md-bitmap.c b/drivers/md/md-bitmap.c
index 37b08f26c62f..45dd3d9f01a8 100644
--- a/drivers/md/md-bitmap.c
+++ b/drivers/md/md-bitmap.c
@@ -789,7 +789,7 @@ static int md_bitmap_new_disk_sb(struct bitmap *bitmap)
* is a good choice? We choose COUNTER_MAX / 2 arbitrarily.
*/
write_behind = bitmap->mddev->bitmap_info.max_write_behind;
- if (write_behind > COUNTER_MAX)
+ if (write_behind > COUNTER_MAX / 2)
write_behind = COUNTER_MAX / 2;
sb->write_behind = cpu_to_le32(write_behind);
bitmap->mddev->bitmap_info.max_write_behind = write_behind;