md/raid1-10: factor out a helper to add bio to plug
authorYu Kuai <yukuai3@huawei.com>
Mon, 29 May 2023 13:11:01 +0000 (21:11 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Jul 2023 14:20:58 +0000 (16:20 +0200)
commitfa0f13a8338ff256535d007f9356465940c6a183
tree68629b50ed10a0a316f389e111d70732ff6f8509
parenta5a1ec06ef2f3cff22f699a761959d0087cd517f
md/raid1-10: factor out a helper to add bio to plug

[ Upstream commit 5ec6ca140a034682e421e2e808ef5ddfdfd65242 ]

The code in raid1 and raid10 is identical, prepare to limit the number
of plugged bios.

Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20230529131106.2123367-3-yukuai1@huaweicloud.com
Stable-dep-of: 7db922bae3ab ("md/raid1-10: submit write io directly if bitmap is not enabled")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/md/raid1-10.c
drivers/md/raid1.c
drivers/md/raid10.c