summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAbd-Alrhman Masalkhi <abd.masalkhi@gmail.com>2026-05-01 14:46:51 +0300
committerYu Kuai <yukuai@fygo.io>2026-05-31 14:09:18 +0300
commitba976e3501111d11c550848b3b7341a73035f582 (patch)
tree3376600a2ab3a25c8560db2ae59789f2abfb5c14 /include/linux
parent811545e0926d02a6a0b1a1258bb5544777c164d4 (diff)
downloadlinux-ba976e3501111d11c550848b3b7341a73035f582.tar.xz
md/raid1,raid10: fix bio accounting for split md cloned bios
Use md_cloned_bio() to control bio accounting instead of relying on r1bio_existed in raid1 or the io_accounting flag in raid10. The previous logic does not reliably reflect whether a bio is an md cloned bio. When a failed bio is split and resubmitted via bio_submit_split_bioset() on the error path, this can lead to either double accounting for md cloned bios, or missing accounting for bios returned from bio_submit_split_bioset() Fix this by using md_cloned_bio() to detect md cloned bios and skip accounting accordingly. Fixes: bb2a9acefaf9 ("md/raid1: switch to use md_account_bio() for io accounting") Fixes: 820455238366 ("md/raid10: switch to use md_account_bio() for io accounting") Signed-off-by: Abd-Alrhman Masalkhi <abd.masalkhi@gmail.com> Reviewed-by: Xiao Ni <xiao@kernel.org> Link: https://patch.msgid.link/20260501114652.590037-4-abd.masalkhi@gmail.com Signed-off-by: Yu Kuai <yukuai@fygo.io>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions