summaryrefslogtreecommitdiff
path: root/block/blk-merge.c
diff options
context:
space:
mode:
authorMing Lei <ming.lei@redhat.com>2019-11-08 13:15:28 +0300
committerJens Axboe <axboe@kernel.dk>2019-11-08 16:59:51 +0300
commit6952a7f8446ee85ea9d10ab87b64797a031eaae3 (patch)
tree74d3fecaa1024ee992b9e8d02333f88edbf34337 /block/blk-merge.c
parent59db8ba2f6528a9c39668f9ed8c81eac1dff3b38 (diff)
downloadlinux-6952a7f8446ee85ea9d10ab87b64797a031eaae3.tar.xz
block: split bio if the only bvec's length is > SZ_4K
64K PAGE_SIZE is popular on ARM64 or other ARCHs, and 64K has been big enough to break some devices probably, so change the logic to split bio if the only bvec's length is > SZ_4K instead of PAGE_SIZE. Fixes: fa5322872187 (block: avoid blk_bio_segment_split for small I/O operations) Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-merge.c')
-rw-r--r--block/blk-merge.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-merge.c b/block/blk-merge.c
index d783bdc4559b..f35327f63ef4 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -320,7 +320,7 @@ void __blk_queue_split(struct request_queue *q, struct bio **bio,
if (!q->limits.chunk_sectors &&
(*bio)->bi_vcnt == 1 &&
((*bio)->bi_io_vec[0].bv_len +
- (*bio)->bi_io_vec[0].bv_offset) <= PAGE_SIZE) {
+ (*bio)->bi_io_vec[0].bv_offset) <= SZ_4K) {
*nr_segs = 1;
break;
}