diff options
author | Keith Busch <keith.busch@intel.com> | 2015-12-22 15:48:44 -0700 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-12-22 17:19:25 -0700 |
commit | d3805611130af9b911e908af9f67a3f64f4f0914 (patch) | |
tree | dd55bd6363e04a32ca4e39661cd097cdb4fa7eff /block/blk-merge.c | |
parent | 24bc3ea5df2e1d89e9d50ecca57c210b87ad61d2 (diff) | |
download | linux-d3805611130af9b911e908af9f67a3f64f4f0914.tar.gz linux-d3805611130af9b911e908af9f67a3f64f4f0914.tar.bz2 linux-d3805611130af9b911e908af9f67a3f64f4f0914.zip |
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>
Diffstat (limited to 'block/blk-merge.c')
-rw-r--r-- | block/blk-merge.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-merge.c b/block/blk-merge.c index e01405a3e8b3..e73846a3d08a 100644 --- a/block/blk-merge.c +++ b/block/blk-merge.c @@ -81,7 +81,7 @@ static struct bio *blk_bio_segment_split(struct request_queue *q, struct bio *new = NULL; bio_for_each_segment(bv, bio, iter) { - if (sectors + (bv.bv_len >> 9) > queue_max_sectors(q)) + if (sectors + (bv.bv_len >> 9) > blk_max_size_offset(q, bio->bi_iter.bi_sector)) goto split; /* |