Lines Matching refs:qn
389 static void throtl_qnode_init(struct throtl_qnode *qn, struct throtl_grp *tg) in throtl_qnode_init() argument
391 INIT_LIST_HEAD(&qn->node); in throtl_qnode_init()
392 bio_list_init(&qn->bios); in throtl_qnode_init()
393 qn->tg = tg; in throtl_qnode_init()
406 static void throtl_qnode_add_bio(struct bio *bio, struct throtl_qnode *qn, in throtl_qnode_add_bio() argument
409 bio_list_add(&qn->bios, bio); in throtl_qnode_add_bio()
410 if (list_empty(&qn->node)) { in throtl_qnode_add_bio()
411 list_add_tail(&qn->node, queued); in throtl_qnode_add_bio()
412 blkg_get(tg_to_blkg(qn->tg)); in throtl_qnode_add_bio()
422 struct throtl_qnode *qn = list_first_entry(queued, struct throtl_qnode, node); in throtl_peek_queued() local
428 bio = bio_list_peek(&qn->bios); in throtl_peek_queued()
450 struct throtl_qnode *qn = list_first_entry(queued, struct throtl_qnode, node); in throtl_pop_queued() local
456 bio = bio_list_pop(&qn->bios); in throtl_pop_queued()
459 if (bio_list_empty(&qn->bios)) { in throtl_pop_queued()
460 list_del_init(&qn->node); in throtl_pop_queued()
462 *tg_to_put = qn->tg; in throtl_pop_queued()
464 blkg_put(tg_to_blkg(qn->tg)); in throtl_pop_queued()
466 list_move_tail(&qn->node, queued); in throtl_pop_queued()
1054 static void throtl_add_bio_tg(struct bio *bio, struct throtl_qnode *qn, in throtl_add_bio_tg() argument
1060 if (!qn) in throtl_add_bio_tg()
1061 qn = &tg->qnode_on_self[rw]; in throtl_add_bio_tg()
1072 throtl_qnode_add_bio(bio, qn, &sq->queued[rw]); in throtl_add_bio_tg()
2120 struct throtl_qnode *qn = NULL; in blk_throtl_bio() local
2182 qn = &tg->qnode_on_parent[rw]; in blk_throtl_bio()
2200 throtl_add_bio_tg(bio, qn, tg); in blk_throtl_bio()