Lines Matching refs:qn
244 static void throtl_qnode_init(struct throtl_qnode *qn, struct throtl_grp *tg) in throtl_qnode_init() argument
246 INIT_LIST_HEAD(&qn->node); in throtl_qnode_init()
247 bio_list_init(&qn->bios); in throtl_qnode_init()
248 qn->tg = tg; in throtl_qnode_init()
261 static void throtl_qnode_add_bio(struct bio *bio, struct throtl_qnode *qn, in throtl_qnode_add_bio() argument
264 bio_list_add(&qn->bios, bio); in throtl_qnode_add_bio()
265 if (list_empty(&qn->node)) { in throtl_qnode_add_bio()
266 list_add_tail(&qn->node, queued); in throtl_qnode_add_bio()
267 blkg_get(tg_to_blkg(qn->tg)); in throtl_qnode_add_bio()
277 struct throtl_qnode *qn; in throtl_peek_queued() local
283 qn = list_first_entry(queued, struct throtl_qnode, node); in throtl_peek_queued()
284 bio = bio_list_peek(&qn->bios); in throtl_peek_queued()
306 struct throtl_qnode *qn; in throtl_pop_queued() local
312 qn = list_first_entry(queued, struct throtl_qnode, node); in throtl_pop_queued()
313 bio = bio_list_pop(&qn->bios); in throtl_pop_queued()
316 if (bio_list_empty(&qn->bios)) { in throtl_pop_queued()
317 list_del_init(&qn->node); in throtl_pop_queued()
319 *tg_to_put = qn->tg; in throtl_pop_queued()
321 blkg_put(tg_to_blkg(qn->tg)); in throtl_pop_queued()
323 list_move_tail(&qn->node, queued); in throtl_pop_queued()
991 static void throtl_add_bio_tg(struct bio *bio, struct throtl_qnode *qn, in throtl_add_bio_tg() argument
997 if (!qn) in throtl_add_bio_tg()
998 qn = &tg->qnode_on_self[rw]; in throtl_add_bio_tg()
1009 throtl_qnode_add_bio(bio, qn, &sq->queued[rw]); in throtl_add_bio_tg()
2161 struct throtl_qnode *qn = NULL; in __blk_throtl_bio() local
2225 qn = &tg->qnode_on_parent[rw]; in __blk_throtl_bio()
2245 throtl_add_bio_tg(bio, qn, tg); in __blk_throtl_bio()