diff options
Diffstat (limited to 'include/linux/blk-mq.h')
-rw-r--r-- | include/linux/blk-mq.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h index 5735e7130d63..7aec86127335 100644 --- a/include/linux/blk-mq.h +++ b/include/linux/blk-mq.h | |||
@@ -146,6 +146,8 @@ enum { | |||
146 | BLK_MQ_F_SG_MERGE = 1 << 2, | 146 | BLK_MQ_F_SG_MERGE = 1 << 2, |
147 | BLK_MQ_F_SYSFS_UP = 1 << 3, | 147 | BLK_MQ_F_SYSFS_UP = 1 << 3, |
148 | BLK_MQ_F_DEFER_ISSUE = 1 << 4, | 148 | BLK_MQ_F_DEFER_ISSUE = 1 << 4, |
149 | BLK_MQ_F_ALLOC_POLICY_START_BIT = 8, | ||
150 | BLK_MQ_F_ALLOC_POLICY_BITS = 1, | ||
149 | 151 | ||
150 | BLK_MQ_S_STOPPED = 0, | 152 | BLK_MQ_S_STOPPED = 0, |
151 | BLK_MQ_S_TAG_ACTIVE = 1, | 153 | BLK_MQ_S_TAG_ACTIVE = 1, |
@@ -154,6 +156,12 @@ enum { | |||
154 | 156 | ||
155 | BLK_MQ_CPU_WORK_BATCH = 8, | 157 | BLK_MQ_CPU_WORK_BATCH = 8, |
156 | }; | 158 | }; |
159 | #define BLK_MQ_FLAG_TO_ALLOC_POLICY(flags) \ | ||
160 | ((flags >> BLK_MQ_F_ALLOC_POLICY_START_BIT) & \ | ||
161 | ((1 << BLK_MQ_F_ALLOC_POLICY_BITS) - 1)) | ||
162 | #define BLK_ALLOC_POLICY_TO_MQ_FLAG(policy) \ | ||
163 | ((policy & ((1 << BLK_MQ_F_ALLOC_POLICY_BITS) - 1)) \ | ||
164 | << BLK_MQ_F_ALLOC_POLICY_START_BIT) | ||
157 | 165 | ||
158 | struct request_queue *blk_mq_init_queue(struct blk_mq_tag_set *); | 166 | struct request_queue *blk_mq_init_queue(struct blk_mq_tag_set *); |
159 | void blk_mq_finish_init(struct request_queue *q); | 167 | void blk_mq_finish_init(struct request_queue *q); |
@@ -166,7 +174,6 @@ void blk_mq_free_tag_set(struct blk_mq_tag_set *set); | |||
166 | void blk_mq_flush_plug_list(struct blk_plug *plug, bool from_schedule); | 174 | void blk_mq_flush_plug_list(struct blk_plug *plug, bool from_schedule); |
167 | 175 | ||
168 | void blk_mq_insert_request(struct request *, bool, bool, bool); | 176 | void blk_mq_insert_request(struct request *, bool, bool, bool); |
169 | void blk_mq_run_queues(struct request_queue *q, bool async); | ||
170 | void blk_mq_free_request(struct request *rq); | 177 | void blk_mq_free_request(struct request *rq); |
171 | void blk_mq_free_hctx_request(struct blk_mq_hw_ctx *, struct request *rq); | 178 | void blk_mq_free_hctx_request(struct blk_mq_hw_ctx *, struct request *rq); |
172 | bool blk_mq_can_queue(struct blk_mq_hw_ctx *); | 179 | bool blk_mq_can_queue(struct blk_mq_hw_ctx *); |
@@ -214,6 +221,7 @@ void blk_mq_start_stopped_hw_queues(struct request_queue *q, bool async); | |||
214 | void blk_mq_delay_queue(struct blk_mq_hw_ctx *hctx, unsigned long msecs); | 221 | void blk_mq_delay_queue(struct blk_mq_hw_ctx *hctx, unsigned long msecs); |
215 | void blk_mq_tag_busy_iter(struct blk_mq_hw_ctx *hctx, busy_iter_fn *fn, | 222 | void blk_mq_tag_busy_iter(struct blk_mq_hw_ctx *hctx, busy_iter_fn *fn, |
216 | void *priv); | 223 | void *priv); |
224 | void blk_mq_freeze_queue(struct request_queue *q); | ||
217 | void blk_mq_unfreeze_queue(struct request_queue *q); | 225 | void blk_mq_unfreeze_queue(struct request_queue *q); |
218 | void blk_mq_freeze_queue_start(struct request_queue *q); | 226 | void blk_mq_freeze_queue_start(struct request_queue *q); |
219 | 227 | ||