summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatias Bjørling <mb@silverwolf.dk>2012-07-13 10:31:21 -0600
committerJens Axboe <axboe@kernel.dk>2012-10-04 11:04:35 +0200
commite26df4267bcfb0414d72e1a4484daf12a4710755 (patch)
treec1833c8ae3f11564c1c3ca89100e92e92eda06c1
parent0d4e53aac982d1ca56570830cdf908377a6c9493 (diff)
multiqueue: trivial - fix up order of request queue initialization of ctx and hctx.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--block/blk-mq.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 3806b5affa23..e7a06e7c0ea9 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -624,16 +624,17 @@ struct request_queue *blk_mq_init_queue(struct blk_mq_reg *reg,
setup_timer(&q->timeout, blk_mq_rq_timer, (unsigned long) q);
blk_queue_rq_timeout(q, 30000);
+ q->nr_queues = nr_cpu_ids;
+ q->nr_hw_queues = reg->nr_hw_queues;
+
q->queue_ctx = ctx;
q->queue_hw_ctx = hctx;
+ q->mq_ops = reg->ops;
+
blk_queue_make_request(q, blk_mq_make_request);
blk_queue_rq_timed_out(q, reg->ops->timeout);
blk_queue_rq_timeout(q, reg->timeout);
- q->mq_ops = reg->ops;
-
- q->nr_queues = nr_cpu_ids;
- q->nr_hw_queues = reg->nr_hw_queues;
for_each_possible_cpu(i) {
struct blk_mq_ctx *__ctx = per_cpu_ptr(ctx, i);