Skip to content

Commit d380561

Browse files
Keith Buschaxboe
Keith Busch
authored andcommitted
block: Split bios on chunk boundaries
For h/w that advertise their block storage's underlying chunk size, it's a big performance win to not submit commands that cross them. This patch uses that criteria if it is provided. If it is not provided, this patch uses the max sectors as before. Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Jens Axboe <axboe@fb.com>
1 parent 24bc3ea commit d380561

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

block/blk-merge.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ static struct bio *blk_bio_segment_split(struct request_queue *q,
8181
struct bio *new = NULL;
8282

8383
bio_for_each_segment(bv, bio, iter) {
84-
if (sectors + (bv.bv_len >> 9) > queue_max_sectors(q))
84+
if (sectors + (bv.bv_len >> 9) > blk_max_size_offset(q, bio->bi_iter.bi_sector))
8585
goto split;
8686

8787
/*

0 commit comments

Comments
 (0)