If the devices sets a chunk size we might have to split I/O that is smaller than a page size if it crosses the chunk boundary. Skip the micro-optimization for small I/Os in that case. Fixes: b072e20f0084 ("block: merge invalidate_partitions into rescan_partitions") Signed-off-by: Christoph Hellwig <hch@xxxxxx> --- block/blk-merge.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/blk-merge.c b/block/blk-merge.c index 06eb38357b41..f22cb6251d06 100644 --- a/block/blk-merge.c +++ b/block/blk-merge.c @@ -317,7 +317,8 @@ void __blk_queue_split(struct request_queue *q, struct bio **bio, * are cloned, but compared to the performance impact of cloned * bios themselves the loop below doesn't matter anyway. */ - if ((*bio)->bi_vcnt == 1 && + if (!q->limits.chunk_sectors && + (*bio)->bi_vcnt == 1 && (*bio)->bi_io_vec[0].bv_len <= PAGE_SIZE) { *nr_segs = 1; break; -- 2.20.1