]> git.baikalelectronics.ru Git - kernel.git/commit
blk-mq: mark request queue as mq asap
authorMing Lei <tom.leiming@gmail.com>
Fri, 12 Feb 2016 07:27:00 +0000 (15:27 +0800)
committerJens Axboe <axboe@fb.com>
Sun, 14 Feb 2016 22:35:14 +0000 (15:35 -0700)
commitb9be80b698d2a29afa94fe91f0cc35b6572595c3
tree878b571be06833c5b407d7eafe2e336e4acad7e9
parentdb439497520f195d867ffa65765ea7ed2be92abc
blk-mq: mark request queue as mq asap

Currently q->mq_ops is used widely to decide if the queue
is mq or not, so we should set the 'flag' asap so that both
block core and drivers can get the correct mq info.

For example, commit 9b556a84ab1(blk-mq: dynamic h/w context count)
moves the hctx's initialization before setting q->mq_ops in
blk_mq_init_allocated_queue(), then cause blk_alloc_flush_queue()
to think the queue is non-mq and don't allocate command size
for the per-hctx flush rq.

This patches should fix the problem reported by Sasha.

Cc: Keith Busch <keith.busch@intel.com>
Reported-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Fixes: 9b556a84ab1 ("blk-mq: dynamic h/w context count")
Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-mq.c