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()
219 if (blkg->pd[i] && pol->pd_init_fn) in blkg_create()
220 pol->pd_init_fn(blkg->pd[i]); in blkg_create()
233 if (blkg->pd[i] && pol->pd_online_fn) in blkg_create()
234 pol->pd_online_fn(blkg->pd[i]); in blkg_create()
324 if (blkg->pd[i] && pol->pd_offline_fn) in blkg_destroy()
325 pol->pd_offline_fn(blkg->pd[i]); in blkg_destroy()
458 if (blkg->pd[i] && pol->pd_reset_stats_fn) in blkcg_reset_stats()
459 pol->pd_reset_stats_fn(blkg->pd[i]); in blkcg_reset_stats()
508 total += prfill(sf, blkg->pd[pol->plid], data); in blkcg_print_blkgs()
526 u64 __blkg_prfill_u64(struct seq_file *sf, struct blkg_policy_data *pd, u64 v) in __blkg_prfill_u64() argument
528 const char *dname = blkg_dev_name(pd->blkg); in __blkg_prfill_u64()
546 u64 __blkg_prfill_rwstat(struct seq_file *sf, struct blkg_policy_data *pd, in __blkg_prfill_rwstat() argument
555 const char *dname = blkg_dev_name(pd->blkg); in __blkg_prfill_rwstat()
581 u64 blkg_prfill_stat(struct seq_file *sf, struct blkg_policy_data *pd, int off) in blkg_prfill_stat() argument
583 return __blkg_prfill_u64(sf, pd, blkg_stat_read((void *)pd + off)); in blkg_prfill_stat()
595 u64 blkg_prfill_rwstat(struct seq_file *sf, struct blkg_policy_data *pd, in blkg_prfill_rwstat() argument
598 struct blkg_rwstat rwstat = blkg_rwstat_read((void *)pd + off); in blkg_prfill_rwstat()
600 return __blkg_prfill_rwstat(sf, pd, &rwstat); in blkg_prfill_rwstat()
605 struct blkg_policy_data *pd, int off) in blkg_prfill_rwstat_field() argument
607 struct blkg_rwstat rwstat = blkg_rwstat_read((void *)pd->blkg + off); in blkg_prfill_rwstat_field()
609 return __blkg_prfill_rwstat(sf, pd, &rwstat); in blkg_prfill_rwstat_field()
647 struct blkg_policy_data *pd, in blkg_prfill_rwstat_field_recursive() argument
650 struct blkg_rwstat rwstat = blkg_rwstat_recursive_sum(pd->blkg, in blkg_prfill_rwstat_field_recursive()
652 return __blkg_prfill_rwstat(sf, pd, &rwstat); in blkg_prfill_rwstat_field_recursive()
1229 struct blkg_policy_data *pd; in blkcg_activate_policy() local
1231 if (blkg->pd[pol->plid]) in blkcg_activate_policy()
1234 pd = pol->pd_alloc_fn(GFP_NOWAIT, q->node); in blkcg_activate_policy()
1235 if (!pd) in blkcg_activate_policy()
1236 swap(pd, pd_prealloc); in blkcg_activate_policy()
1237 if (!pd) { in blkcg_activate_policy()
1242 blkg->pd[pol->plid] = pd; in blkcg_activate_policy()
1243 pd->blkg = blkg; in blkcg_activate_policy()
1244 pd->plid = pol->plid; in blkcg_activate_policy()
1246 pol->pd_init_fn(pd); in blkcg_activate_policy()
1286 if (blkg->pd[pol->plid]) { in blkcg_deactivate_policy()
1288 pol->pd_offline_fn(blkg->pd[pol->plid]); in blkcg_deactivate_policy()
1289 pol->pd_free_fn(blkg->pd[pol->plid]); in blkcg_deactivate_policy()
1290 blkg->pd[pol->plid] = NULL; in blkcg_deactivate_policy()