diff options
author | Christoph Hellwig <hch@lst.de> | 2017-06-19 09:26:23 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-06-27 12:13:45 -0600 |
commit | 0b0bcacc3b4300c4bba0bacb4c7a279b2728f331 (patch) | |
tree | aa0742924c868090ad708668dc757922e1971fd4 /block | |
parent | 1c4bc3ab9a064d98cdf6de6b44f89d5c3757fa32 (diff) | |
download | linux-stable-0b0bcacc3b4300c4bba0bacb4c7a279b2728f331.tar.gz linux-stable-0b0bcacc3b4300c4bba0bacb4c7a279b2728f331.tar.bz2 linux-stable-0b0bcacc3b4300c4bba0bacb4c7a279b2728f331.zip |
block: don't bother with bounce limits for make_request drivers
We only call blk_queue_bounce for request-based drivers, so stop messing
with it for make_request based drivers.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-core.c | 5 | ||||
-rw-r--r-- | block/blk-mq.c | 5 | ||||
-rw-r--r-- | block/blk-settings.c | 5 |
3 files changed, 10 insertions, 5 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index af393d5a9680..8699c423fa6e 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -989,6 +989,11 @@ int blk_init_allocated_queue(struct request_queue *q) */ blk_queue_make_request(q, blk_queue_bio); + /* + * by default assume old behaviour and bounce for any highmem page + */ + blk_queue_bounce_limit(q, BLK_BOUNCE_HIGH); + q->sg_reserved_size = INT_MAX; /* Protect q->elevator from elevator_change */ diff --git a/block/blk-mq.c b/block/blk-mq.c index 05dfa3f270ae..41e3aeb51c9a 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -2350,6 +2350,11 @@ struct request_queue *blk_mq_init_allocated_queue(struct blk_mq_tag_set *set, blk_queue_make_request(q, blk_mq_make_request); /* + * by default assume old behaviour and bounce for any highmem page + */ + blk_queue_bounce_limit(q, BLK_BOUNCE_HIGH); + + /* * Do this after blk_queue_make_request() overrides it... */ q->nr_requests = set->queue_depth; diff --git a/block/blk-settings.c b/block/blk-settings.c index 4fa81ed383ca..be1f115b538b 100644 --- a/block/blk-settings.c +++ b/block/blk-settings.c @@ -172,11 +172,6 @@ void blk_queue_make_request(struct request_queue *q, make_request_fn *mfn) q->nr_batching = BLK_BATCH_REQ; blk_set_default_limits(&q->limits); - - /* - * by default assume old behaviour and bounce for any highmem page - */ - blk_queue_bounce_limit(q, BLK_BOUNCE_HIGH); } EXPORT_SYMBOL(blk_queue_make_request); |