Lines Matching refs:pd
12 struct dd_blkcg *pd; in dd_cpd_alloc() local
14 pd = kzalloc(sizeof(*pd), gfp); in dd_cpd_alloc()
15 if (!pd) in dd_cpd_alloc()
17 pd->stats = alloc_percpu_gfp(typeof(*pd->stats), in dd_cpd_alloc()
19 if (!pd->stats) { in dd_cpd_alloc()
20 kfree(pd); in dd_cpd_alloc()
23 return &pd->cpd; in dd_cpd_alloc()
34 static struct dd_blkcg *dd_blkcg_from_pd(struct blkg_policy_data *pd) in dd_blkcg_from_pd() argument
36 return container_of(blkcg_to_cpd(pd->blkg->blkcg, &dd_blkcg_policy), in dd_blkcg_from_pd()
46 struct blkg_policy_data *pd; in dd_blkcg_from_bio() local
48 pd = blkg_to_pd(bio->bi_blkg, &dd_blkcg_policy); in dd_blkcg_from_bio()
49 if (!pd) in dd_blkcg_from_bio()
52 return dd_blkcg_from_pd(pd); in dd_blkcg_from_bio()
55 static size_t dd_pd_stat(struct blkg_policy_data *pd, char *buf, size_t size) in dd_pd_stat() argument
63 struct dd_blkcg *blkcg = dd_blkcg_from_pd(pd); in dd_pd_stat()
84 struct dd_blkg *pd; in dd_pd_alloc() local
86 pd = kzalloc(sizeof(*pd), gfp); in dd_pd_alloc()
87 if (!pd) in dd_pd_alloc()
89 return &pd->pd; in dd_pd_alloc()
92 static void dd_pd_free(struct blkg_policy_data *pd) in dd_pd_free() argument
94 struct dd_blkg *dd_blkg = container_of(pd, typeof(*dd_blkg), pd); in dd_pd_free()