Lines Matching refs:qn
306 static void throtl_qnode_init(struct throtl_qnode *qn, struct throtl_grp *tg) in throtl_qnode_init() argument
308 INIT_LIST_HEAD(&qn->node); in throtl_qnode_init()
309 bio_list_init(&qn->bios); in throtl_qnode_init()
310 qn->tg = tg; in throtl_qnode_init()
323 static void throtl_qnode_add_bio(struct bio *bio, struct throtl_qnode *qn, in throtl_qnode_add_bio() argument
326 bio_list_add(&qn->bios, bio); in throtl_qnode_add_bio()
327 if (list_empty(&qn->node)) { in throtl_qnode_add_bio()
328 list_add_tail(&qn->node, queued); in throtl_qnode_add_bio()
329 blkg_get(tg_to_blkg(qn->tg)); in throtl_qnode_add_bio()
339 struct throtl_qnode *qn = list_first_entry(queued, struct throtl_qnode, node); in throtl_peek_queued() local
345 bio = bio_list_peek(&qn->bios); in throtl_peek_queued()
367 struct throtl_qnode *qn = list_first_entry(queued, struct throtl_qnode, node); in throtl_pop_queued() local
373 bio = bio_list_pop(&qn->bios); in throtl_pop_queued()
376 if (bio_list_empty(&qn->bios)) { in throtl_pop_queued()
377 list_del_init(&qn->node); in throtl_pop_queued()
379 *tg_to_put = qn->tg; in throtl_pop_queued()
381 blkg_put(tg_to_blkg(qn->tg)); in throtl_pop_queued()
383 list_move_tail(&qn->node, queued); in throtl_pop_queued()
1020 static void throtl_add_bio_tg(struct bio *bio, struct throtl_qnode *qn, in throtl_add_bio_tg() argument
1026 if (!qn) in throtl_add_bio_tg()
1027 qn = &tg->qnode_on_self[rw]; in throtl_add_bio_tg()
1038 throtl_qnode_add_bio(bio, qn, &sq->queued[rw]); in throtl_add_bio_tg()
1483 struct throtl_qnode *qn = NULL; in blk_throtl_bio() local
1551 qn = &tg->qnode_on_parent[rw]; in blk_throtl_bio()
1567 throtl_add_bio_tg(bio, qn, tg); in blk_throtl_bio()