diff options
author | Christoph Hellwig <hch@lst.de> | 2016-09-14 16:18:54 +0200 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-09-15 16:42:03 +0200 |
commit | 7d7e0f90b70f6c5367c2d1c9a7e87dd228bd0816 (patch) | |
tree | 6105df4466a36e85a24ead3b67a35d31f9f37011 /block/blk.h | |
parent | blk-mq: only allocate a single mq_map per tag_set (diff) | |
download | linux-7d7e0f90b70f6c5367c2d1c9a7e87dd228bd0816.tar.xz linux-7d7e0f90b70f6c5367c2d1c9a7e87dd228bd0816.zip |
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.h')
-rw-r--r-- | block/blk.h | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/block/blk.h b/block/blk.h index c37492f5edaa..74444c49078f 100644 --- a/block/blk.h +++ b/block/blk.h @@ -39,14 +39,9 @@ extern struct ida blk_queue_ida; static inline struct blk_flush_queue *blk_get_flush_queue( struct request_queue *q, struct blk_mq_ctx *ctx) { - struct blk_mq_hw_ctx *hctx; - - if (!q->mq_ops) - return q->fq; - - hctx = q->mq_ops->map_queue(q, ctx->cpu); - - return hctx->fq; + if (q->mq_ops) + return blk_mq_map_queue(q, ctx->cpu)->fq; + return q->fq; } static inline void __blk_get_queue(struct request_queue *q) |