]> www.infradead.org Git - users/jedix/linux-maple.git/commit
md/raid1: factor out helper to handle blocked rdev from raid1_write_request()
authorYu Kuai <yukuai3@huawei.com>
Thu, 31 Oct 2024 03:31:11 +0000 (11:31 +0800)
committerSong Liu <song@kernel.org>
Wed, 6 Nov 2024 00:08:39 +0000 (16:08 -0800)
commit88ed59c4cc6c2dbdf03345bce54e0d7a272937bc
tree9fc9476ee8d2b321d926ae621d7b138849eca319
parent29967332ced51a15a22f11381eeebbc500ba1858
md/raid1: factor out helper to handle blocked rdev from raid1_write_request()

Currently raid1 is preparing IO for underlying disks while checking if
any disk is blocked, if so allocated resources must be released, then
waiting for rdev to be unblocked and try to prepare IO again.

Make code cleaner by checking blocked rdev first, it doesn't matter if
rdev is blocked while issuing IO, the IO will wait for rdev to be
unblocked or not.

Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Tested-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Link: https://lore.kernel.org/r/20241031033114.3845582-5-yukuai1@huaweicloud.com
Signed-off-by: Song Liu <song@kernel.org>
drivers/md/raid1.c