summaryrefslogtreecommitdiff
path: root/block/blk-mq.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2016-09-14 14:18:54 (GMT)
committerJens Axboe <axboe@fb.com>2016-09-15 14:42:03 (GMT)
commit7d7e0f90b70f6c5367c2d1c9a7e87dd228bd0816 (patch)
tree6105df4466a36e85a24ead3b67a35d31f9f37011 /block/blk-mq.h
parentbdd17e75cd97c5c39feee409890a91d0396640fe (diff)
downloadlinux-7d7e0f90b70f6c5367c2d1c9a7e87dd228bd0816.tar.xz
blk-mq: remove ->map_queue
All drivers use the default, so provide an inline version of it. If we ever need other queue mapping we can add an optional method back, although supporting will also require major changes to the queue setup code. This provides better code generation, and better debugability as well. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-mq.h')
-rw-r--r--block/blk-mq.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/block/blk-mq.h b/block/blk-mq.h
index 9087b11..ec774bf 100644
--- a/block/blk-mq.h
+++ b/block/blk-mq.h
@@ -52,6 +52,12 @@ extern int blk_mq_update_queue_map(unsigned int *map, unsigned int nr_queues,
const struct cpumask *online_mask);
extern int blk_mq_hw_queue_to_node(unsigned int *map, unsigned int);
+static inline struct blk_mq_hw_ctx *blk_mq_map_queue(struct request_queue *q,
+ int cpu)
+{
+ return q->queue_hw_ctx[q->mq_map[cpu]];
+}
+
/*
* sysfs helpers
*/