summaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorMing Lei <ming.lei@redhat.com>2019-12-29 10:32:30 +0800
committerJens Axboe <axboe@kernel.dk>2019-12-30 08:51:18 -0700
commit429120f3df2dba2bf3a4a19f4212a53ecefc7102 (patch)
treee989064d73899fd0f606ab80c5174eaea1be5436 /samples
parent85a8ce62c2eabe28b9d76ca4eecf37922402df93 (diff)
block: fix splitting segments on boundary masks
We ran into a problem with a mpt3sas based controller, where we would see random (and hard to reproduce) file corruption). The issue seemed specific to this controller, but wasn't specific to the file system. After a lot of debugging, we find out that it's caused by segments spanning a 4G memory boundary. This shouldn't happen, as the default setting for segment boundary masks is 4G. Turns out there are two issues in get_max_segment_size(): 1) The default segment boundary mask is bypassed 2) The segment start address isn't taken into account when checking segment boundary limit Fix these two issues by removing the bypass of the segment boundary check even if the mask is set to the default value, and taking into account the actual start address of the request when checking if a segment needs splitting. Cc: stable@vger.kernel.org # v5.1+ Reviewed-by: Chris Mason <clm@fb.com> Tested-by: Chris Mason <clm@fb.com> Fixes: dcebd755926b ("block: use bio_for_each_bvec() to compute multi-page bvec count") Signed-off-by: Ming Lei <ming.lei@redhat.com> Dropped const on the page pointer, ppc page_to_phys() doesn't mark the page as const... Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'samples')
0 files changed, 0 insertions, 0 deletions