Lines Matching refs:qn
396 static void throtl_qnode_init(struct throtl_qnode *qn, struct throtl_grp *tg) in throtl_qnode_init() argument
398 INIT_LIST_HEAD(&qn->node); in throtl_qnode_init()
399 bio_list_init(&qn->bios); in throtl_qnode_init()
400 qn->tg = tg; in throtl_qnode_init()
413 static void throtl_qnode_add_bio(struct bio *bio, struct throtl_qnode *qn, in throtl_qnode_add_bio() argument
416 bio_list_add(&qn->bios, bio); in throtl_qnode_add_bio()
417 if (list_empty(&qn->node)) { in throtl_qnode_add_bio()
418 list_add_tail(&qn->node, queued); in throtl_qnode_add_bio()
419 blkg_get(tg_to_blkg(qn->tg)); in throtl_qnode_add_bio()
429 struct throtl_qnode *qn; in throtl_peek_queued() local
435 qn = list_first_entry(queued, struct throtl_qnode, node); in throtl_peek_queued()
436 bio = bio_list_peek(&qn->bios); in throtl_peek_queued()
458 struct throtl_qnode *qn; in throtl_pop_queued() local
464 qn = list_first_entry(queued, struct throtl_qnode, node); in throtl_pop_queued()
465 bio = bio_list_pop(&qn->bios); in throtl_pop_queued()
468 if (bio_list_empty(&qn->bios)) { in throtl_pop_queued()
469 list_del_init(&qn->node); in throtl_pop_queued()
471 *tg_to_put = qn->tg; in throtl_pop_queued()
473 blkg_put(tg_to_blkg(qn->tg)); in throtl_pop_queued()
475 list_move_tail(&qn->node, queued); in throtl_pop_queued()
1085 static void throtl_add_bio_tg(struct bio *bio, struct throtl_qnode *qn, in throtl_add_bio_tg() argument
1091 if (!qn) in throtl_add_bio_tg()
1092 qn = &tg->qnode_on_self[rw]; in throtl_add_bio_tg()
1103 throtl_qnode_add_bio(bio, qn, &sq->queued[rw]); in throtl_add_bio_tg()
2209 struct throtl_qnode *qn = NULL; in blk_throtl_bio() local
2280 qn = &tg->qnode_on_parent[rw]; in blk_throtl_bio()
2298 throtl_add_bio_tg(bio, qn, tg); in blk_throtl_bio()