Skip to content

Commit

Permalink
blk-mq: initialize q->nr_requests after calling blk_queue_make_request()
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
axboe committed May 20, 2014
1 parent e3a2b3f commit eba7176
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions block/blk-mq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit eba7176

Please sign in to comment.