diff options
| author | Abd-Alrhman Masalkhi <abd.masalkhi@gmail.com> | 2026-05-01 13:46:51 +0200 |
|---|---|---|
| committer | Yu Kuai <yukuai@fygo.io> | 2026-05-31 19:09:18 +0800 |
| commit | ba976e3501111d11c550848b3b7341a73035f582 (patch) | |
| tree | 3376600a2ab3a25c8560db2ae59789f2abfb5c14 /include/linux/debugobjects.h | |
| parent | 811545e0926d02a6a0b1a1258bb5544777c164d4 (diff) | |
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/debugobjects.h')
0 files changed, 0 insertions, 0 deletions
