On Fri, Jul 12, 2024 at 9:17 AM Yu Kuai yukuai1@huaweicloud.com wrote: [...]
After investigation, it turned out that choose_slow_rdev() does not set the value of max_sectors in some cases and because of it, raid1_read_request calls bio_split with sectors == 0.
Fix it by filling in this variable.
This bug was introduced in commit dfa8ecd167c1 ("md/raid1: factor out choose_slow_rdev() from read_balance()") but apparently hidden until commit 0091c5a269ec ("md/raid1: factor out helpers to choose the best rdev from read_balance()") shortly thereafter.
Cc: stable@vger.kernel.org # 6.9.x+ Signed-off-by: Mateusz Jończyk mat.jonczyk@o2.pl Fixes: dfa8ecd167c1 ("md/raid1: factor out choose_slow_rdev() from read_balance()") Cc: Song Liu song@kernel.org Cc: Yu Kuai yukuai3@huawei.com Cc: Paul Luse paul.e.luse@linux.intel.com Cc: Xiao Ni xni@redhat.com Cc: Mariusz Tkaczyk mariusz.tkaczyk@linux.intel.com Link: https://lore.kernel.org/linux-raid/20240706143038.7253-1-mat.jonczyk@o2.pl/
--
Thanks for the patch!
Reviewed-by: Yu Kuai yukuai3@huawei.com
Applied to md-6.11. Thanks!
Song