summaryrefslogtreecommitdiff
path: root/block/blk-mq.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2018-10-29 22:11:38 +0300
committerJens Axboe <axboe@kernel.dk>2018-11-07 23:44:59 +0300
commitf9afca4d367b8c915f28d29fcaba7460640403ff (patch)
tree452e46a75ae18332d1d795b32554943de47db4c2 /block/blk-mq.h
parentff2c56609d9b1f0739ae3a3bfdb78191d01e4192 (diff)
downloadlinux-f9afca4d367b8c915f28d29fcaba7460640403ff.tar.xz
blk-mq: pass in request/bio flags to queue mapping
Prep patch for being able to place request based not just on CPU location, but also on the type of request. Reviewed-by: Hannes Reinecke <hare@suse.com> 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.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/block/blk-mq.h b/block/blk-mq.h
index d9facfb9ca51..6a8f8b60d8ba 100644
--- a/block/blk-mq.h
+++ b/block/blk-mq.h
@@ -73,6 +73,7 @@ void blk_mq_try_issue_list_directly(struct blk_mq_hw_ctx *hctx,
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,
+ unsigned int flags,
unsigned int cpu)
{
struct blk_mq_tag_set *set = q->tag_set;
@@ -84,7 +85,7 @@ static inline struct blk_mq_hw_ctx *blk_mq_map_queue_type(struct request_queue *
unsigned int hctx_type,
unsigned int cpu)
{
- return blk_mq_map_queue(q, cpu);
+ return blk_mq_map_queue(q, hctx_type, cpu);
}
/*
@@ -135,6 +136,7 @@ struct blk_mq_alloc_data {
struct request_queue *q;
blk_mq_req_flags_t flags;
unsigned int shallow_depth;
+ unsigned int cmd_flags;
/* input & output parameter */
struct blk_mq_ctx *ctx;
@@ -209,7 +211,7 @@ static inline void blk_mq_put_driver_tag(struct request *rq)
if (rq->tag == -1 || rq->internal_tag == -1)
return;
- hctx = blk_mq_map_queue(rq->q, rq->mq_ctx->cpu);
+ hctx = blk_mq_map_queue(rq->q, rq->cmd_flags, rq->mq_ctx->cpu);
__blk_mq_put_driver_tag(hctx, rq);
}