summaryrefslogtreecommitdiff
path: root/drivers/md
diff options
context:
space:
mode:
authorYu Kuai <yukuai3@huawei.com>2025-05-24 14:13:10 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-07-06 10:57:55 +0200
commit53cebdfe810625eac7dbb085c849c7fdefb39974 (patch)
treef05f2dc2eff45ae1042f07151c4c2f9255ed4e4b /drivers/md
parentf9a8b3b8ed1ab4b0d7878635aca5f4e1e3b707b3 (diff)
downloadlinux-53cebdfe810625eac7dbb085c849c7fdefb39974.tar.gz
linux-53cebdfe810625eac7dbb085c849c7fdefb39974.tar.bz2
linux-53cebdfe810625eac7dbb085c849c7fdefb39974.zip
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/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>
Diffstat (limited to 'drivers/md')
-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 02629516748e..dac27206cd3d 100644
--- a/drivers/md/md-bitmap.c
+++ b/drivers/md/md-bitmap.c
@@ -546,7 +546,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;