]> git.baikalelectronics.ru Git - kernel.git/commit
blk-mq: skip zero-queue maps in blk_mq_map_swqueue
authorMing Lei <ming.lei@redhat.com>
Mon, 17 Dec 2018 17:28:56 +0000 (01:28 +0800)
committerJens Axboe <axboe@kernel.dk>
Mon, 17 Dec 2018 18:19:55 +0000 (11:19 -0700)
commit4653825659b621d2103852dbd89a7327da48453f
treea61df6c3d7132d57294cd0dd2be47ae067afcfed
parent586b806ee0a16e62424fea5ee1701248591736dd
blk-mq: skip zero-queue maps in blk_mq_map_swqueue

From d3f03507c5c1 ("nvme-pci: don't share queue maps"), the mapping
table won't be initialized actually if map->nr_queues is zero, so
we can't use blk_mq_map_queue_type() to retrieve hctx any more.

This way still may cause broken mapping, fix it by skipping zero-queues
maps in blk_mq_map_swqueue().

Cc: Jeff Moyer <jmoyer@redhat.com>
Cc: Mike Snitzer <snitzer@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c