blk-mq: support multiple hctx maps
authorJens Axboe <axboe@kernel.dk>
Tue, 30 Oct 2018 16:36:06 +0000 (10:36 -0600)
committerJens Axboe <axboe@kernel.dk>
Wed, 7 Nov 2018 02:47:53 +0000 (19:47 -0700)
commit884d6f89311e3d18ced3cbfdaa5e843ba07e1063
tree54215fbaee3c7efb24efd7a41f4d9c9ab65023bd
parent92faac99c328d17628fff1a52828ab13e49901e8
blk-mq: support multiple hctx maps

Add support for the tag set carrying multiple queue maps, and
for the driver to inform blk-mq how many it wishes to support
through setting set->nr_maps.

This adds an mq_ops helper for drivers that support more than 1
map, mq_ops->rq_flags_to_type(). The function takes request/bio
flags and CPU, and returns a queue map index for that. We then
use the type information in blk_mq_map_queue() to index the map
set.

Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c
block/blk-mq.h
include/linux/blk-mq.h