Lines Matching refs:pol
36 const struct blkcg_policy *pol) in blkcg_policy_enabled() argument
38 return pol && test_bit(pol->plid, q->blkcg_pols); in blkcg_policy_enabled()
93 struct blkcg_policy *pol = blkcg_policy[i]; in blkg_alloc() local
96 if (!blkcg_policy_enabled(q, pol)) in blkg_alloc()
100 pd = kzalloc_node(pol->pd_size, gfp_mask, q->node); in blkg_alloc()
215 struct blkcg_policy *pol = blkcg_policy[i]; in blkg_create() local
217 if (blkg->pd[i] && pol->pd_init_fn) in blkg_create()
218 pol->pd_init_fn(blkg); in blkg_create()
229 struct blkcg_policy *pol = blkcg_policy[i]; in blkg_create() local
231 if (blkg->pd[i] && pol->pd_online_fn) in blkg_create()
232 pol->pd_online_fn(blkg); in blkg_create()
323 struct blkcg_policy *pol = blkcg_policy[i]; in blkg_destroy() local
325 if (blkg->pd[i] && pol->pd_offline_fn) in blkg_destroy()
326 pol->pd_offline_fn(blkg); in blkg_destroy()
394 struct blkcg_policy *pol = blkcg_policy[i]; in __blkg_release_rcu() local
396 if (blkg->pd[i] && pol->pd_exit_fn) in __blkg_release_rcu()
397 pol->pd_exit_fn(blkg); in __blkg_release_rcu()
474 struct blkcg_policy *pol = blkcg_policy[i]; in blkcg_reset_stats() local
476 if (blkcg_policy_enabled(blkg->q, pol) && in blkcg_reset_stats()
477 pol->pd_reset_stats_fn) in blkcg_reset_stats()
478 pol->pd_reset_stats_fn(blkg); in blkcg_reset_stats()
516 const struct blkcg_policy *pol, int data, in blkcg_print_blkgs() argument
525 if (blkcg_policy_enabled(blkg->q, pol)) in blkcg_print_blkgs()
526 total += prfill(sf, blkg->pd[pol->plid], data); in blkcg_print_blkgs()
632 struct blkcg_policy *pol = blkcg_policy[pd->plid]; in blkg_stat_recursive_sum() local
641 struct blkg_policy_data *pos_pd = blkg_to_pd(pos_blkg, pol); in blkg_stat_recursive_sum()
665 struct blkcg_policy *pol = blkcg_policy[pd->plid]; in blkg_rwstat_recursive_sum() local
675 struct blkg_policy_data *pos_pd = blkg_to_pd(pos_blkg, pol); in blkg_rwstat_recursive_sum()
705 int blkg_conf_prep(struct blkcg *blkcg, const struct blkcg_policy *pol, in blkg_conf_prep() argument
729 if (blkcg_policy_enabled(disk->queue, pol)) in blkg_conf_prep()
962 const struct blkcg_policy *pol) in blkcg_activate_policy() argument
970 if (blkcg_policy_enabled(q, pol)) in blkcg_activate_policy()
1012 pd = kzalloc_node(pol->pd_size, GFP_KERNEL, q->node); in blkcg_activate_policy()
1038 blkg->pd[pol->plid] = pd; in blkcg_activate_policy()
1040 pd->plid = pol->plid; in blkcg_activate_policy()
1041 pol->pd_init_fn(blkg); in blkcg_activate_policy()
1046 __set_bit(pol->plid, q->blkcg_pols); in blkcg_activate_policy()
1067 const struct blkcg_policy *pol) in blkcg_deactivate_policy() argument
1071 if (!blkcg_policy_enabled(q, pol)) in blkcg_deactivate_policy()
1077 __clear_bit(pol->plid, q->blkcg_pols); in blkcg_deactivate_policy()
1087 if (pol->pd_offline_fn) in blkcg_deactivate_policy()
1088 pol->pd_offline_fn(blkg); in blkcg_deactivate_policy()
1089 if (pol->pd_exit_fn) in blkcg_deactivate_policy()
1090 pol->pd_exit_fn(blkg); in blkcg_deactivate_policy()
1092 kfree(blkg->pd[pol->plid]); in blkcg_deactivate_policy()
1093 blkg->pd[pol->plid] = NULL; in blkcg_deactivate_policy()
1110 int blkcg_policy_register(struct blkcg_policy *pol) in blkcg_policy_register() argument
1114 if (WARN_ON(pol->pd_size < sizeof(struct blkg_policy_data))) in blkcg_policy_register()
1128 pol->plid = i; in blkcg_policy_register()
1129 blkcg_policy[i] = pol; in blkcg_policy_register()
1132 if (pol->cftypes) in blkcg_policy_register()
1134 pol->cftypes)); in blkcg_policy_register()
1148 void blkcg_policy_unregister(struct blkcg_policy *pol) in blkcg_policy_unregister() argument
1152 if (WARN_ON(blkcg_policy[pol->plid] != pol)) in blkcg_policy_unregister()
1156 if (pol->cftypes) in blkcg_policy_unregister()
1157 cgroup_rm_cftypes(pol->cftypes); in blkcg_policy_unregister()
1160 blkcg_policy[pol->plid] = NULL; in blkcg_policy_unregister()