linux-stable/block
Ming Lei 429120f3df 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: dcebd75592 ("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>
2019-12-30 08:51:18 -07:00
..
partitions
Kconfig
Kconfig.iosched
Makefile
badblocks.c
bfq-cgroup.c
bfq-iosched.c
bfq-iosched.h
bfq-wf2q.c
bio-integrity.c
bio.c block: add bio_truncate to fix guard_bio_eod 2019-12-28 09:44:56 -07:00
blk-cgroup-rwstat.c
blk-cgroup-rwstat.h
blk-cgroup.c
blk-core.c block: end bio with BLK_STS_AGAIN in case of non-mq devs and REQ_NOWAIT 2019-12-17 09:01:43 -07:00
blk-exec.c
blk-flush.c block: Fix a lockdep complaint triggered by request queue flushing 2019-12-20 11:52:01 -07:00
blk-integrity.c
blk-ioc.c
blk-iocost.c
blk-iolatency.c
blk-lib.c
blk-map.c block: fix memleak when __blk_rq_map_user_iov() is failed 2019-12-20 11:52:01 -07:00
blk-merge.c block: fix splitting segments on boundary masks 2019-12-30 08:51:18 -07:00
blk-mq-cpumap.c
blk-mq-debugfs-zoned.c
blk-mq-debugfs.c
blk-mq-debugfs.h
blk-mq-pci.c
blk-mq-rdma.c
blk-mq-sched.c
blk-mq-sched.h
blk-mq-sysfs.c
blk-mq-tag.c
blk-mq-tag.h
blk-mq-virtio.c
blk-mq.c
blk-mq.h
blk-pm.c
blk-pm.h
blk-rq-qos.c
blk-rq-qos.h
blk-settings.c
blk-softirq.c
blk-stat.c
blk-stat.h
blk-sysfs.c
blk-throttle.c
blk-timeout.c
blk-wbt.c
blk-wbt.h
blk-zoned.c
blk.h block: Fix a lockdep complaint triggered by request queue flushing 2019-12-20 11:52:01 -07:00
bounce.c
bsg-lib.c block: Fix the type of 'sts' in bsg_queue_rq() 2019-12-20 11:52:01 -07:00
bsg.c
cmdline-parser.c
compat_ioctl.c compat_ioctl: block: handle Persistent Reservations 2019-12-21 07:26:56 -07:00
elevator.c
genhd.c
ioctl.c
ioprio.c
kyber-iosched.c
mq-deadline.c
opal_proto.h
partition-generic.c
scsi_ioctl.c
sed-opal.c
t10-pi.c