diff options
author | Jens Axboe <axboe@fb.com> | 2014-05-20 23:17:27 +0200 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2014-05-20 23:17:27 +0200 |
commit | eba7176826ddab1d04c51bb2d5f2bbf22865444c (patch) | |
tree | 3e8beb8ad309fe13fa1ac81a3c16397ddfb8b7bb /block | |
parent | blk-mq: allow changing of queue depth through sysfs (diff) | |
download | linux-eba7176826ddab1d04c51bb2d5f2bbf22865444c.tar.xz linux-eba7176826ddab1d04c51bb2d5f2bbf22865444c.zip |
blk-mq: initialize q->nr_requests after calling blk_queue_make_request()
blk_queue_make_requests() overwrites our set value for q->nr_requests,
turning it into the default of 128. Set this appropriately after
initializing queue values in blk_queue_make_request().
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to '')
-rw-r--r-- | block/blk-mq.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index 7b71ab1b1536..fec8fcc4f8a4 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1623,6 +1623,11 @@ struct request_queue *blk_mq_init_queue(struct blk_mq_tag_set *set) if (set->timeout) blk_queue_rq_timeout(q, set->timeout); + /* + * Do this after blk_queue_make_request() overrides it... + */ + q->nr_requests = set->queue_depth; + if (set->ops->complete) blk_queue_softirq_done(q, set->ops->complete); |