Lines Matching refs:pd
72 if (blkg->pd[i]) in blkg_free()
73 blkcg_policy[i]->pd_free_fn(blkg->pd[i]); in blkg_free()
120 struct blkg_policy_data *pd; in blkg_alloc() local
126 pd = pol->pd_alloc_fn(gfp_mask, q->node); in blkg_alloc()
127 if (!pd) in blkg_alloc()
130 blkg->pd[i] = pd; in blkg_alloc()
131 pd->blkg = blkg; in blkg_alloc()
132 pd->plid = i; in blkg_alloc()
220 if (blkg->pd[i] && pol->pd_init_fn) in blkg_create()
221 pol->pd_init_fn(blkg->pd[i]); in blkg_create()
234 if (blkg->pd[i] && pol->pd_online_fn) in blkg_create()
235 pol->pd_online_fn(blkg->pd[i]); in blkg_create()
325 if (blkg->pd[i] && pol->pd_offline_fn) in blkg_destroy()
326 pol->pd_offline_fn(blkg->pd[i]); in blkg_destroy()
459 if (blkg->pd[i] && pol->pd_reset_stats_fn) in blkcg_reset_stats()
460 pol->pd_reset_stats_fn(blkg->pd[i]); in blkcg_reset_stats()
509 total += prfill(sf, blkg->pd[pol->plid], data); in blkcg_print_blkgs()
527 u64 __blkg_prfill_u64(struct seq_file *sf, struct blkg_policy_data *pd, u64 v) in __blkg_prfill_u64() argument
529 const char *dname = blkg_dev_name(pd->blkg); in __blkg_prfill_u64()
547 u64 __blkg_prfill_rwstat(struct seq_file *sf, struct blkg_policy_data *pd, in __blkg_prfill_rwstat() argument
556 const char *dname = blkg_dev_name(pd->blkg); in __blkg_prfill_rwstat()
582 u64 blkg_prfill_stat(struct seq_file *sf, struct blkg_policy_data *pd, int off) in blkg_prfill_stat() argument
584 return __blkg_prfill_u64(sf, pd, blkg_stat_read((void *)pd + off)); in blkg_prfill_stat()
596 u64 blkg_prfill_rwstat(struct seq_file *sf, struct blkg_policy_data *pd, in blkg_prfill_rwstat() argument
599 struct blkg_rwstat rwstat = blkg_rwstat_read((void *)pd + off); in blkg_prfill_rwstat()
601 return __blkg_prfill_rwstat(sf, pd, &rwstat); in blkg_prfill_rwstat()
606 struct blkg_policy_data *pd, int off) in blkg_prfill_rwstat_field() argument
608 struct blkg_rwstat rwstat = blkg_rwstat_read((void *)pd->blkg + off); in blkg_prfill_rwstat_field()
610 return __blkg_prfill_rwstat(sf, pd, &rwstat); in blkg_prfill_rwstat_field()
648 struct blkg_policy_data *pd, in blkg_prfill_rwstat_field_recursive() argument
651 struct blkg_rwstat rwstat = blkg_rwstat_recursive_sum(pd->blkg, in blkg_prfill_rwstat_field_recursive()
653 return __blkg_prfill_rwstat(sf, pd, &rwstat); in blkg_prfill_rwstat_field_recursive()
1237 struct blkg_policy_data *pd; in blkcg_activate_policy() local
1239 if (blkg->pd[pol->plid]) in blkcg_activate_policy()
1242 pd = pol->pd_alloc_fn(GFP_NOWAIT | __GFP_NOWARN, q->node); in blkcg_activate_policy()
1243 if (!pd) in blkcg_activate_policy()
1244 swap(pd, pd_prealloc); in blkcg_activate_policy()
1245 if (!pd) { in blkcg_activate_policy()
1250 blkg->pd[pol->plid] = pd; in blkcg_activate_policy()
1251 pd->blkg = blkg; in blkcg_activate_policy()
1252 pd->plid = pol->plid; in blkcg_activate_policy()
1254 pol->pd_init_fn(pd); in blkcg_activate_policy()
1294 if (blkg->pd[pol->plid]) { in blkcg_deactivate_policy()
1296 pol->pd_offline_fn(blkg->pd[pol->plid]); in blkcg_deactivate_policy()
1297 pol->pd_free_fn(blkg->pd[pol->plid]); in blkcg_deactivate_policy()
1298 blkg->pd[pol->plid] = NULL; in blkcg_deactivate_policy()