summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorYu Kuai <yukuai@fygo.io>2026-08-03 03:50:20 +0800
committerYu Kuai <yukuai@fygo.io>2026-08-07 14:43:34 +0800
commitffd3e73d6e0c88f1cc7f5137978427a404fa5026 (patch)
tree1ccea422606f08fc19a0eb2685b4d8e4f882e438 /tools/perf/scripts/python/bin
parent87c10252e3d6c28769d93bea9e6a9b592e5809d1 (diff)
md: add helper to split bios at reshape offset
Add mddev_bio_split_at_reshape_offset() so personalities can share reshape-offset bio splitting instead of open-coding the same boundary handling in multiple places. The helper first applies the optional max_sectors limit. If reshape is running and the bio crosses reshape_position, it further limits the front bio to the current reshape boundary so callers can account and submit one side of the reshape at a time. Snapshot reshape_position with READ_ONCE(). RAID5 and RAID10 update this field as reshape progresses, while the I/O path only needs one consistent decision point for the current bio. Using an explicit single load avoids a plain lockless access and prevents the compiler from refetching a different boundary while deciding whether and where to split. When a split is needed, bio_submit_split_bioset() submits the remainder and returns the front bio. Callers must therefore continue processing the returned bio, not the original pointer. Tested-by: Mykola Marzhan <mykola@meshstor.io> Link: https://patch.msgid.link/20260802195038.164272-12-yukuai@kernel.org Signed-off-by: Yu Kuai <yukuai@fygo.io>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions