Lines Matching defs:qn
397 static void throtl_qnode_init(struct throtl_qnode *qn, struct throtl_grp *tg)
399 INIT_LIST_HEAD(&qn->node);
400 bio_list_init(&qn->bios);
401 qn->tg = tg;
407 * @qn: qnode to add bio to
408 * @queued: the service_queue->queued[] list @qn belongs to
410 * Add @bio to @qn and put @qn on @queued if it's not already on.
411 * @qn->tg's reference count is bumped when @qn is activated. See the
414 static void throtl_qnode_add_bio(struct bio *bio, struct throtl_qnode *qn,
417 bio_list_add(&qn->bios, bio);
418 if (list_empty(&qn->node)) {
419 list_add_tail(&qn->node, queued);
420 blkg_get(tg_to_blkg(qn->tg));
430 struct throtl_qnode *qn;
436 qn = list_first_entry(queued, struct throtl_qnode, node);
437 bio = bio_list_peek(&qn->bios);
459 struct throtl_qnode *qn;
465 qn = list_first_entry(queued, struct throtl_qnode, node);
466 bio = bio_list_pop(&qn->bios);
469 if (bio_list_empty(&qn->bios)) {
470 list_del_init(&qn->node);
472 *tg_to_put = qn->tg;
474 blkg_put(tg_to_blkg(qn->tg));
476 list_move_tail(&qn->node, queued);
1080 * @qn: qnode to use
1083 * Add @bio to @tg's service_queue using @qn. If @qn is not specified,
1086 static void throtl_add_bio_tg(struct bio *bio, struct throtl_qnode *qn,
1092 if (!qn)
1093 qn = &tg->qnode_on_self[rw];
1104 throtl_qnode_add_bio(bio, qn, &sq->queued[rw]);
2244 struct throtl_qnode *qn = NULL;
2315 qn = &tg->qnode_on_parent[rw];
2333 throtl_add_bio_tg(bio, qn, tg);