Lines Matching defs:qn
244 static void throtl_qnode_init(struct throtl_qnode *qn, struct throtl_grp *tg)
246 INIT_LIST_HEAD(&qn->node);
247 bio_list_init(&qn->bios);
248 qn->tg = tg;
254 * @qn: qnode to add bio to
255 * @queued: the service_queue->queued[] list @qn belongs to
257 * Add @bio to @qn and put @qn on @queued if it's not already on.
258 * @qn->tg's reference count is bumped when @qn is activated. See the
261 static void throtl_qnode_add_bio(struct bio *bio, struct throtl_qnode *qn,
264 bio_list_add(&qn->bios, bio);
265 if (list_empty(&qn->node)) {
266 list_add_tail(&qn->node, queued);
267 blkg_get(tg_to_blkg(qn->tg));
277 struct throtl_qnode *qn;
283 qn = list_first_entry(queued, struct throtl_qnode, node);
284 bio = bio_list_peek(&qn->bios);
306 struct throtl_qnode *qn;
312 qn = list_first_entry(queued, struct throtl_qnode, node);
313 bio = bio_list_pop(&qn->bios);
316 if (bio_list_empty(&qn->bios)) {
317 list_del_init(&qn->node);
319 *tg_to_put = qn->tg;
321 blkg_put(tg_to_blkg(qn->tg));
323 list_move_tail(&qn->node, queued);
979 * @qn: qnode to use
982 * Add @bio to @tg's service_queue using @qn. If @qn is not specified,
985 static void throtl_add_bio_tg(struct bio *bio, struct throtl_qnode *qn,
991 if (!qn)
992 qn = &tg->qnode_on_self[rw];
1003 throtl_qnode_add_bio(bio, qn, &sq->queued[rw]);
2180 struct throtl_qnode *qn = NULL;
2238 qn = &tg->qnode_on_parent[rw];
2258 throtl_add_bio_tg(bio, qn, tg);