summaryrefslogtreecommitdiffstats
path: root/block/blk-mq.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2018-10-29 13:06:14 -0600
committerJens Axboe <axboe@kernel.dk>2018-11-07 13:44:59 -0700
commited76e329d74a4b15ac0f5fd3adbd52ec0178a134 (patch)
tree628ce9d3ac0997faef04f2d9e4f4d169594fe366 /block/blk-mq.h
parenta8908939af569ce2419f43fd56eeaf003bc3d85d (diff)
downloadlinux-ed76e329d74a4b15ac0f5fd3adbd52ec0178a134.tar.gz
linux-ed76e329d74a4b15ac0f5fd3adbd52ec0178a134.tar.bz2
linux-ed76e329d74a4b15ac0f5fd3adbd52ec0178a134.zip
blk-mq: abstract out queue map
This is in preparation for allowing multiple sets of maps per queue, if so desired. Reviewed-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-mq.h')
-rw-r--r--block/blk-mq.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/block/blk-mq.h b/block/blk-mq.h
index 9536be06d022..889f0069dd80 100644
--- a/block/blk-mq.h
+++ b/block/blk-mq.h
@@ -70,14 +70,14 @@ void blk_mq_try_issue_list_directly(struct blk_mq_hw_ctx *hctx,
/*
* CPU -> queue mappings
*/
-extern int blk_mq_hw_queue_to_node(unsigned int *map, unsigned int);
+extern int blk_mq_hw_queue_to_node(struct blk_mq_queue_map *qmap, unsigned int);
static inline struct blk_mq_hw_ctx *blk_mq_map_queue(struct request_queue *q,
int cpu)
{
struct blk_mq_tag_set *set = q->tag_set;
- return q->queue_hw_ctx[set->mq_map[cpu]];
+ return q->queue_hw_ctx[set->map[0].mq_map[cpu]];
}
/*
@@ -206,12 +206,12 @@ static inline void blk_mq_put_driver_tag(struct request *rq)
__blk_mq_put_driver_tag(hctx, rq);
}
-static inline void blk_mq_clear_mq_map(struct blk_mq_tag_set *set)
+static inline void blk_mq_clear_mq_map(struct blk_mq_queue_map *qmap)
{
int cpu;
for_each_possible_cpu(cpu)
- set->mq_map[cpu] = 0;
+ qmap->mq_map[cpu] = 0;
}
#endif