Lines Matching refs:blkg
87 struct blkcg_gq *blkg; member
188 const char *blkg_dev_name(struct blkcg_gq *blkg);
205 u64 blkg_stat_recursive_sum(struct blkcg_gq *blkg,
207 struct blkg_rwstat blkg_rwstat_recursive_sum(struct blkcg_gq *blkg,
212 struct blkcg_gq *blkg; member
270 struct blkcg_gq *blkg; in __blkg_lookup() local
275 blkg = rcu_dereference(blkcg->blkg_hint); in __blkg_lookup()
276 if (blkg && blkg->q == q) in __blkg_lookup()
277 return blkg; in __blkg_lookup()
308 static inline struct blkg_policy_data *blkg_to_pd(struct blkcg_gq *blkg, in blkg_to_pd() argument
311 return blkg ? blkg->pd[pol->plid] : NULL; in blkg_to_pd()
328 return pd ? pd->blkg : NULL; in pd_to_blkg()
344 static inline int blkg_path(struct blkcg_gq *blkg, char *buf, int buflen) in blkg_path() argument
348 p = cgroup_path(blkg->blkcg->css.cgroup, buf, buflen); in blkg_path()
364 static inline void blkg_get(struct blkcg_gq *blkg) in blkg_get() argument
366 WARN_ON_ONCE(atomic_read(&blkg->refcnt) <= 0); in blkg_get()
367 atomic_inc(&blkg->refcnt); in blkg_get()
376 static inline void blkg_put(struct blkcg_gq *blkg) in blkg_put() argument
378 WARN_ON_ONCE(atomic_read(&blkg->refcnt) <= 0); in blkg_put()
379 if (atomic_dec_and_test(&blkg->refcnt)) in blkg_put()
380 call_rcu(&blkg->rcu_head, __blkg_release_rcu); in blkg_put()
429 struct blkcg_gq *blkg; in blk_get_rl() local
444 blkg = blkg_lookup(blkcg, q); in blk_get_rl()
445 if (unlikely(!blkg)) in blk_get_rl()
448 blkg_get(blkg); in blk_get_rl()
450 return &blkg->rl; in blk_get_rl()
465 if (rl->blkg->blkcg != &blkcg_root) in blk_put_rl()
466 blkg_put(rl->blkg); in blk_put_rl()
686 extern bool blk_throtl_bio(struct request_queue *q, struct blkcg_gq *blkg,
689 static inline bool blk_throtl_bio(struct request_queue *q, struct blkcg_gq *blkg, in blk_throtl_bio() argument
697 struct blkcg_gq *blkg; in blkcg_bio_issue_check() local
703 blkg = blkg_lookup(blkcg, q); in blkcg_bio_issue_check()
704 if (unlikely(!blkg)) { in blkcg_bio_issue_check()
706 blkg = blkg_lookup_create(blkcg, q); in blkcg_bio_issue_check()
707 if (IS_ERR(blkg)) in blkcg_bio_issue_check()
708 blkg = NULL; in blkcg_bio_issue_check()
712 throtl = blk_throtl_bio(q, blkg, bio); in blkcg_bio_issue_check()
715 blkg = blkg ?: q->root_blkg; in blkcg_bio_issue_check()
716 blkg_rwstat_add(&blkg->stat_bytes, bio->bi_rw, in blkcg_bio_issue_check()
718 blkg_rwstat_add(&blkg->stat_ios, bio->bi_rw, 1); in blkcg_bio_issue_check()
765 static inline struct blkg_policy_data *blkg_to_pd(struct blkcg_gq *blkg, in blkg_to_pd() argument
768 static inline char *blkg_path(struct blkcg_gq *blkg) { return NULL; } in blkg_path() argument
769 static inline void blkg_get(struct blkcg_gq *blkg) { } in blkg_get() argument
770 static inline void blkg_put(struct blkcg_gq *blkg) { } in blkg_put() argument