Lines Matching refs:pd

55 		kfree(blkg->pd[i]);  in blkg_free()
94 struct blkg_policy_data *pd; in blkg_alloc() local
100 pd = kzalloc_node(pol->pd_size, gfp_mask, q->node); in blkg_alloc()
101 if (!pd) in blkg_alloc()
104 blkg->pd[i] = pd; in blkg_alloc()
105 pd->blkg = blkg; in blkg_alloc()
106 pd->plid = i; in blkg_alloc()
217 if (blkg->pd[i] && pol->pd_init_fn) in blkg_create()
231 if (blkg->pd[i] && pol->pd_online_fn) in blkg_create()
325 if (blkg->pd[i] && pol->pd_offline_fn) in blkg_destroy()
396 if (blkg->pd[i] && pol->pd_exit_fn) in __blkg_release_rcu()
526 total += prfill(sf, blkg->pd[pol->plid], data); in blkcg_print_blkgs()
544 u64 __blkg_prfill_u64(struct seq_file *sf, struct blkg_policy_data *pd, u64 v) in __blkg_prfill_u64() argument
546 const char *dname = blkg_dev_name(pd->blkg); in __blkg_prfill_u64()
564 u64 __blkg_prfill_rwstat(struct seq_file *sf, struct blkg_policy_data *pd, in __blkg_prfill_rwstat() argument
573 const char *dname = blkg_dev_name(pd->blkg); in __blkg_prfill_rwstat()
598 u64 blkg_prfill_stat(struct seq_file *sf, struct blkg_policy_data *pd, int off) in blkg_prfill_stat() argument
600 return __blkg_prfill_u64(sf, pd, blkg_stat_read((void *)pd + off)); in blkg_prfill_stat()
612 u64 blkg_prfill_rwstat(struct seq_file *sf, struct blkg_policy_data *pd, in blkg_prfill_rwstat() argument
615 struct blkg_rwstat rwstat = blkg_rwstat_read((void *)pd + off); in blkg_prfill_rwstat()
617 return __blkg_prfill_rwstat(sf, pd, &rwstat); in blkg_prfill_rwstat()
630 u64 blkg_stat_recursive_sum(struct blkg_policy_data *pd, int off) in blkg_stat_recursive_sum() argument
632 struct blkcg_policy *pol = blkcg_policy[pd->plid]; in blkg_stat_recursive_sum()
637 lockdep_assert_held(pd->blkg->q->queue_lock); in blkg_stat_recursive_sum()
640 blkg_for_each_descendant_pre(pos_blkg, pos_css, pd_to_blkg(pd)) { in blkg_stat_recursive_sum()
662 struct blkg_rwstat blkg_rwstat_recursive_sum(struct blkg_policy_data *pd, in blkg_rwstat_recursive_sum() argument
665 struct blkcg_policy *pol = blkcg_policy[pd->plid]; in blkg_rwstat_recursive_sum()
671 lockdep_assert_held(pd->blkg->q->queue_lock); in blkg_rwstat_recursive_sum()
674 blkg_for_each_descendant_pre(pos_blkg, pos_css, pd_to_blkg(pd)) { in blkg_rwstat_recursive_sum()
966 struct blkg_policy_data *pd, *n; in blkcg_activate_policy() local
1012 pd = kzalloc_node(pol->pd_size, GFP_KERNEL, q->node); in blkcg_activate_policy()
1013 if (!pd) { in blkcg_activate_policy()
1017 list_add_tail(&pd->alloc_node, &pds); in blkcg_activate_policy()
1032 pd = list_first_entry(&pds, struct blkg_policy_data, alloc_node); in blkcg_activate_policy()
1033 list_del_init(&pd->alloc_node); in blkcg_activate_policy()
1038 blkg->pd[pol->plid] = pd; in blkcg_activate_policy()
1039 pd->blkg = blkg; in blkcg_activate_policy()
1040 pd->plid = pol->plid; in blkcg_activate_policy()
1052 list_for_each_entry_safe(pd, n, &pds, alloc_node) in blkcg_activate_policy()
1053 kfree(pd); in blkcg_activate_policy()
1092 kfree(blkg->pd[pol->plid]); in blkcg_deactivate_policy()
1093 blkg->pd[pol->plid] = NULL; in blkcg_deactivate_policy()