Commit 45a10e2d authored by Yu Kuai's avatar Yu Kuai Committed by openeuler-sync-bot
Browse files

md/raid1-10: factor out a helper to add bio to plug

mainline inclusion
from mainline-v6.5-rc1
commit 5ec6ca14
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I8UKFJ
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5ec6ca140a034682e421e2e808ef5ddfdfd65242



----------------------------------------

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

Signed-off-by: default avatarYu Kuai <yukuai3@huawei.com>
Signed-off-by: default avatarSong Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20230529131106.2123367-3-yukuai1@huaweicloud.com



Conflicts:
  Commit 309dca30 ("block: store a block_device pointer in struct bio")
  changed "mbio->bi_disk" to "mbio->bi_bdev";
  Commit 2e94275e ("md/raid1: use rdev in raid1_write_request directly")
  changed "conf->mirrors[i].rdev" to "rdev";
  Commit cb1802ff ("md/raid10: Use the new blk_opf_t type") changed the
  type of "do_sync" and "do_fua".
Signed-off-by: default avatarLi Lingfeng <lilingfeng3@huawei.com>
(cherry picked from commit 3d7faae4)
parent d8aa28f1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment