Lines Matching full:q

29 	struct request_queue *q;  member
61 static inline struct rq_qos *rq_qos_id(struct request_queue *q, in rq_qos_id() argument
65 for (rqos = q->rq_qos; rqos; rqos = rqos->next) { in rq_qos_id()
72 static inline struct rq_qos *wbt_rq_qos(struct request_queue *q) in wbt_rq_qos() argument
74 return rq_qos_id(q, RQ_QOS_WBT); in wbt_rq_qos()
77 static inline struct rq_qos *blkcg_rq_qos(struct request_queue *q) in blkcg_rq_qos() argument
79 return rq_qos_id(q, RQ_QOS_LATENCY); in blkcg_rq_qos()
88 static inline int rq_qos_add(struct request_queue *q, struct rq_qos *rqos) in rq_qos_add() argument
97 blk_mq_freeze_queue(q); in rq_qos_add()
99 spin_lock_irq(&q->queue_lock); in rq_qos_add()
100 if (rq_qos_id(q, rqos->id)) in rq_qos_add()
102 rqos->next = q->rq_qos; in rq_qos_add()
103 q->rq_qos = rqos; in rq_qos_add()
104 spin_unlock_irq(&q->queue_lock); in rq_qos_add()
106 blk_mq_unfreeze_queue(q); in rq_qos_add()
109 mutex_lock(&q->debugfs_mutex); in rq_qos_add()
111 mutex_unlock(&q->debugfs_mutex); in rq_qos_add()
116 spin_unlock_irq(&q->queue_lock); in rq_qos_add()
117 blk_mq_unfreeze_queue(q); in rq_qos_add()
122 static inline void rq_qos_del(struct request_queue *q, struct rq_qos *rqos) in rq_qos_del() argument
130 blk_mq_freeze_queue(q); in rq_qos_del()
132 spin_lock_irq(&q->queue_lock); in rq_qos_del()
133 for (cur = &q->rq_qos; *cur; cur = &(*cur)->next) { in rq_qos_del()
139 spin_unlock_irq(&q->queue_lock); in rq_qos_del()
141 blk_mq_unfreeze_queue(q); in rq_qos_del()
143 mutex_lock(&q->debugfs_mutex); in rq_qos_del()
145 mutex_unlock(&q->debugfs_mutex); in rq_qos_del()
169 static inline void rq_qos_cleanup(struct request_queue *q, struct bio *bio) in rq_qos_cleanup() argument
171 if (q->rq_qos) in rq_qos_cleanup()
172 __rq_qos_cleanup(q->rq_qos, bio); in rq_qos_cleanup()
175 static inline void rq_qos_done(struct request_queue *q, struct request *rq) in rq_qos_done() argument
177 if (q->rq_qos) in rq_qos_done()
178 __rq_qos_done(q->rq_qos, rq); in rq_qos_done()
181 static inline void rq_qos_issue(struct request_queue *q, struct request *rq) in rq_qos_issue() argument
183 if (q->rq_qos) in rq_qos_issue()
184 __rq_qos_issue(q->rq_qos, rq); in rq_qos_issue()
187 static inline void rq_qos_requeue(struct request_queue *q, struct request *rq) in rq_qos_requeue() argument
189 if (q->rq_qos) in rq_qos_requeue()
190 __rq_qos_requeue(q->rq_qos, rq); in rq_qos_requeue()
197 struct request_queue *q = bdev_get_queue(bio->bi_bdev); in rq_qos_done_bio() local
198 if (q->rq_qos) in rq_qos_done_bio()
199 __rq_qos_done_bio(q->rq_qos, bio); in rq_qos_done_bio()
203 static inline void rq_qos_throttle(struct request_queue *q, struct bio *bio) in rq_qos_throttle() argument
205 if (q->rq_qos) { in rq_qos_throttle()
207 __rq_qos_throttle(q->rq_qos, bio); in rq_qos_throttle()
211 static inline void rq_qos_track(struct request_queue *q, struct request *rq, in rq_qos_track() argument
214 if (q->rq_qos) in rq_qos_track()
215 __rq_qos_track(q->rq_qos, rq, bio); in rq_qos_track()
218 static inline void rq_qos_merge(struct request_queue *q, struct request *rq, in rq_qos_merge() argument
221 if (q->rq_qos) { in rq_qos_merge()
223 __rq_qos_merge(q->rq_qos, rq, bio); in rq_qos_merge()
227 static inline void rq_qos_queue_depth_changed(struct request_queue *q) in rq_qos_queue_depth_changed() argument
229 if (q->rq_qos) in rq_qos_queue_depth_changed()
230 __rq_qos_queue_depth_changed(q->rq_qos); in rq_qos_queue_depth_changed()