summaryrefslogtreecommitdiffstats
path: root/block/blk-mq.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2018-10-29 15:11:38 -0400
committerJens Axboe <axboe@kernel.dk>2018-11-07 15:44:59 -0500
commitf9afca4d367b8c915f28d29fcaba7460640403ff (patch)
tree452e46a75ae18332d1d795b32554943de47db4c2 /block/blk-mq.h
parentff2c56609d9b1f0739ae3a3bfdb78191d01e4192 (diff)
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,
73extern int blk_mq_hw_queue_to_node(struct blk_mq_queue_map *qmap, unsigned int); 73extern int blk_mq_hw_queue_to_node(struct blk_mq_queue_map *qmap, unsigned int);
74 74
75static inline struct blk_mq_hw_ctx *blk_mq_map_queue(struct request_queue *q, 75static inline struct blk_mq_hw_ctx *blk_mq_map_queue(struct request_queue *q,
76 unsigned int flags,
76 unsigned int cpu) 77 unsigned int cpu)
77{ 78{
78 struct blk_mq_tag_set *set = q->tag_set; 79 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 *
84 unsigned int hctx_type, 85 unsigned int hctx_type,
85 unsigned int cpu) 86 unsigned int cpu)
86{ 87{
87 return blk_mq_map_queue(q, cpu); 88 return blk_mq_map_queue(q, hctx_type, cpu);
88} 89}
89 90
90/* 91/*
@@ -135,6 +136,7 @@ struct blk_mq_alloc_data {
135 struct request_queue *q; 136 struct request_queue *q;
136 blk_mq_req_flags_t flags; 137 blk_mq_req_flags_t flags;
137 unsigned int shallow_depth; 138 unsigned int shallow_depth;
139 unsigned int cmd_flags;
138 140
139 /* input & output parameter */ 141 /* input & output parameter */
140 struct blk_mq_ctx *ctx; 142 struct blk_mq_ctx *ctx;
@@ -209,7 +211,7 @@ static inline void blk_mq_put_driver_tag(struct request *rq)
209 if (rq->tag == -1 || rq->internal_tag == -1) 211 if (rq->tag == -1 || rq->internal_tag == -1)
210 return; 212 return;
211 213
212 hctx = blk_mq_map_queue(rq->q, rq->mq_ctx->cpu); 214 hctx = blk_mq_map_queue(rq->q, rq->cmd_flags, rq->mq_ctx->cpu);
213 __blk_mq_put_driver_tag(hctx, rq); 215 __blk_mq_put_driver_tag(hctx, rq);
214} 216}
215 217