summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorYu Kuai <yukuai@fygo.io>2026-06-05 15:26:37 +0800
committerYu Kuai <yukuai@fygo.io>2026-06-21 03:16:24 +0800
commit74ddbf98e2db646ec58f7e7731c936b7a4a470fe (patch)
tree834d3b3c3970e82bd3264acaef0ec0af58b941fb /include/linux
parenta4c55c902670f2784d3001652183aafa17712cfe (diff)
md/raid5: account discard IO
Raid5 handles discard bios internally through make_discard_request() and never passes them through md_account_bio(). As a result, discard IO is missing the md-device iostat accounting that normal raid5 IO and discard IO in other raid levels get from md_account_bio(). Before accounting the bio, trim the request to the full data stripes that raid5 will actually discard. The first full stripe is the ceiling of the bio start divided by data-stripe sectors, and the last full stripe is the floor of the bio end divided by data-stripe sectors. Account that exact MD logical full-stripe range, then restore the original iterator so bio completion and iostat still cover the original request. Link: https://patch.msgid.link/20260605072639.2434847-2-yukuai@kernel.org Signed-off-by: Yu Kuai <yukuai@fygo.io>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions