Skip to content
Commit 66841672 authored by Ming Lei's avatar Ming Lei Committed by Jens Axboe
Browse files

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 868f2f0b

(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: default avatarSasha Levin <sasha.levin@oracle.com>
Signed-off-by: default avatarMing Lei <tom.leiming@gmail.com>
Fixes: 868f2f0b

 ("blk-mq: dynamic h/w context count")
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent d5df731a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment