Lines Matching refs:q
53 struct request_queue *q = rq->q; in blk_stat_add() local
65 list_for_each_entry_rcu(cb, &q->stats->callbacks, list) { in blk_stat_add()
136 void blk_stat_add_callback(struct request_queue *q, in blk_stat_add_callback() argument
151 spin_lock_irqsave(&q->stats->lock, flags); in blk_stat_add_callback()
152 list_add_tail_rcu(&cb->list, &q->stats->callbacks); in blk_stat_add_callback()
153 blk_queue_flag_set(QUEUE_FLAG_STATS, q); in blk_stat_add_callback()
154 spin_unlock_irqrestore(&q->stats->lock, flags); in blk_stat_add_callback()
157 void blk_stat_remove_callback(struct request_queue *q, in blk_stat_remove_callback() argument
162 spin_lock_irqsave(&q->stats->lock, flags); in blk_stat_remove_callback()
164 if (list_empty(&q->stats->callbacks) && !q->stats->enable_accounting) in blk_stat_remove_callback()
165 blk_queue_flag_clear(QUEUE_FLAG_STATS, q); in blk_stat_remove_callback()
166 spin_unlock_irqrestore(&q->stats->lock, flags); in blk_stat_remove_callback()
187 void blk_stat_enable_accounting(struct request_queue *q) in blk_stat_enable_accounting() argument
191 spin_lock_irqsave(&q->stats->lock, flags); in blk_stat_enable_accounting()
192 q->stats->enable_accounting = true; in blk_stat_enable_accounting()
193 blk_queue_flag_set(QUEUE_FLAG_STATS, q); in blk_stat_enable_accounting()
194 spin_unlock_irqrestore(&q->stats->lock, flags); in blk_stat_enable_accounting()