aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/compaction-times.py
diff options
context:
space:
mode:
authorLong Li <[email protected]>2021-06-07 12:34:05 -0700
committerJens Axboe <[email protected]>2021-06-08 15:06:49 -0600
commitc9c9762d4d44dcb1b2ba90cfb4122dc11ceebf31 (patch)
tree3b02e3849b5c1ee1662576ef3c79ef4d1d87f39c /tools/perf/scripts/python/compaction-times.py
parent7cc2623d1c84935f06fbdf727f41d70f4c779ef6 (diff)
block: return the correct bvec when checking for gaps
After commit 07173c3ec276 ("block: enable multipage bvecs"), a bvec can have multiple pages. But bio_will_gap() still assumes one page bvec while checking for merging. If the pages in the bvec go across the seg_boundary_mask, this check for merging can potentially succeed if only the 1st page is tested, and can fail if all the pages are tested. Later, when SCSI builds the SG list the same check for merging is done in __blk_segment_map_sg_merge() with all the pages in the bvec tested. This time the check may fail if the pages in bvec go across the seg_boundary_mask (but tested okay in bio_will_gap() earlier, so those BIOs were merged). If this check fails, we end up with a broken SG list for drivers assuming the SG list not having offsets in intermediate pages. This results in incorrect pages written to the disk. Fix this by returning the multi-page bvec when testing gaps for merging. Cc: Jens Axboe <[email protected]> Cc: Johannes Thumshirn <[email protected]> Cc: Pavel Begunkov <[email protected]> Cc: Ming Lei <[email protected]> Cc: Tejun Heo <[email protected]> Cc: "Matthew Wilcox (Oracle)" <[email protected]> Cc: Jeffle Xu <[email protected]> Cc: [email protected] Cc: [email protected] Fixes: 07173c3ec276 ("block: enable multipage bvecs") Signed-off-by: Long Li <[email protected]> Reviewed-by: Ming Lei <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/compaction-times.py')
0 files changed, 0 insertions, 0 deletions