md/raid10: factor out dereference_rdev_and_rrdev()
authorLi Nan <linan122@huawei.com>
Sat, 1 Jul 2023 08:05:28 +0000 (16:05 +0800)
committerSong Liu <song@kernel.org>
Thu, 27 Jul 2023 07:13:30 +0000 (00:13 -0700)
commitb99f8fd2d91eb734f13098aa1cf337edaca454b7
tree5f1ece777891e5a8c9348604422e460f7bf31f3b
parent7e85c41b9e1df9192c225afd7cfec8dcad137feb
md/raid10: factor out dereference_rdev_and_rrdev()

Factor out a helper to get 'rdev' and 'replacement' from config->mirrors.
Just to make code cleaner and prepare to fix the bug of io loss while
'replacement' replace 'rdev'.

There is no functional change.

Signed-off-by: Li Nan <linan122@huawei.com>
Link: https://lore.kernel.org/r/20230701080529.2684932-3-linan666@huaweicloud.com
Signed-off-by: Song Liu <song@kernel.org>
drivers/md/raid10.c