md: add a new api sync_io_depth
authorYu Kuai <yukuai3@huawei.com>
Tue, 6 May 2025 12:49:01 +0000 (20:49 +0800)
committerYu Kuai <yukuai3@huawei.com>
Sat, 10 May 2025 08:12:52 +0000 (16:12 +0800)
commit03720d82d730d49f517b7ae04a4a4b6a90f5082a
tree4b675f28b5c77b36d95170e6bf86e86b3fa9b1f6
parent7168be3c8a6b76ba10a51615a5bdf985dd502226
md: add a new api sync_io_depth

Currently if sync speed is above speed_min and below speed_max,
md_do_sync() will wait for all sync IOs to be done before issuing new
sync IO, means sync IO depth is limited to just 1.

This limit is too low, in order to prevent sync speed drop conspicuously
after fixing is_mddev_idle() in the next patch, add a new api for
limiting sync IO depth, the default value is 32.

Link: https://lore.kernel.org/linux-raid/20250506124903.2540268-8-yukuai1@huaweicloud.com
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Reviewed-by: Xiao Ni <xni@redhat.com>
drivers/md/md.c
drivers/md/md.h