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 20:44:59 +0000 (13:44 -0700)
commitb3c661b15d5ab11d982e58bee23e05c1780528a1
treed9976237d4749482b7948282a1cc08e2e27767d3
parenta783b81820fe3532809c98371ec904dfdb0ea9e5
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