blk-mq.h (58f7553fa424fd0fd74e8b796d50c66014cebebe) blk-mq.h (d220a21410e445324b8ae67d93f9c51406f99a29)
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef INT_BLK_MQ_H
3#define INT_BLK_MQ_H
4
5#include "blk-stat.h"
6#include "blk-mq-tag.h"
7
8struct blk_mq_tag_set;

--- 85 unchanged lines hidden (view full) ---

94{
95 return q->queue_hw_ctx[q->tag_set->map[type].mq_map[cpu]];
96}
97
98/*
99 * blk_mq_map_queue() - map (cmd_flags,type) to hardware queue
100 * @q: request queue
101 * @flags: request command flags
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef INT_BLK_MQ_H
3#define INT_BLK_MQ_H
4
5#include "blk-stat.h"
6#include "blk-mq-tag.h"
7
8struct blk_mq_tag_set;

--- 85 unchanged lines hidden (view full) ---

94{
95 return q->queue_hw_ctx[q->tag_set->map[type].mq_map[cpu]];
96}
97
98/*
99 * blk_mq_map_queue() - map (cmd_flags,type) to hardware queue
100 * @q: request queue
101 * @flags: request command flags
102 * @cpu: cpu ctx
102 * @ctx: software queue cpu ctx
103 */
104static inline struct blk_mq_hw_ctx *blk_mq_map_queue(struct request_queue *q,
105 unsigned int flags,
106 struct blk_mq_ctx *ctx)
107{
108 enum hctx_type type = HCTX_TYPE_DEFAULT;
109
110 /*

--- 66 unchanged lines hidden (view full) ---

177 return test_bit(BLK_MQ_S_STOPPED, &hctx->state);
178}
179
180static inline bool blk_mq_hw_queue_mapped(struct blk_mq_hw_ctx *hctx)
181{
182 return hctx->nr_ctx && hctx->tags;
183}
184
103 */
104static inline struct blk_mq_hw_ctx *blk_mq_map_queue(struct request_queue *q,
105 unsigned int flags,
106 struct blk_mq_ctx *ctx)
107{
108 enum hctx_type type = HCTX_TYPE_DEFAULT;
109
110 /*

--- 66 unchanged lines hidden (view full) ---

177 return test_bit(BLK_MQ_S_STOPPED, &hctx->state);
178}
179
180static inline bool blk_mq_hw_queue_mapped(struct blk_mq_hw_ctx *hctx)
181{
182 return hctx->nr_ctx && hctx->tags;
183}
184
185unsigned int blk_mq_in_flight(struct request_queue *q, struct hd_struct *part);
186void blk_mq_in_flight_rw(struct request_queue *q, struct hd_struct *part,
187 unsigned int inflight[2]);
185unsigned int blk_mq_in_flight(struct request_queue *q,
186 struct block_device *part);
187void blk_mq_in_flight_rw(struct request_queue *q, struct block_device *part,
188 unsigned int inflight[2]);
188
189static inline void blk_mq_put_dispatch_budget(struct request_queue *q)
190{
191 if (q->mq_ops->put_budget)
192 q->mq_ops->put_budget(q);
193}
194
195static inline bool blk_mq_get_dispatch_budget(struct request_queue *q)

--- 131 unchanged lines hidden ---
189
190static inline void blk_mq_put_dispatch_budget(struct request_queue *q)
191{
192 if (q->mq_ops->put_budget)
193 q->mq_ops->put_budget(q);
194}
195
196static inline bool blk_mq_get_dispatch_budget(struct request_queue *q)

--- 131 unchanged lines hidden ---