Lines Matching refs:pi

29 	struct path_info *pi = s->path_map[cpu];  in ioa_free_path()  local
31 if (!pi) in ioa_free_path()
34 if (refcount_dec_and_test(&pi->refcount)) { in ioa_free_path()
36 free_cpumask_var(pi->cpumask); in ioa_free_path()
37 kfree(pi); in ioa_free_path()
47 struct path_info *pi = NULL; in ioa_add_path() local
56 pi = kzalloc(sizeof(*pi), GFP_KERNEL); in ioa_add_path()
57 if (!pi) { in ioa_add_path()
62 pi->path = path; in ioa_add_path()
63 path->pscontext = pi; in ioa_add_path()
64 refcount_set(&pi->refcount, 1); in ioa_add_path()
66 if (!zalloc_cpumask_var(&pi->cpumask, GFP_KERNEL)) { in ioa_add_path()
72 ret = cpumask_parse(argv[0], pi->cpumask); in ioa_add_path()
79 for_each_cpu(cpu, pi->cpumask) { in ioa_add_path()
92 s->path_map[cpu] = pi; in ioa_add_path()
93 refcount_inc(&pi->refcount); in ioa_add_path()
96 if (refcount_dec_and_test(&pi->refcount)) { in ioa_add_path()
105 free_cpumask_var(pi->cpumask); in ioa_add_path()
107 kfree(pi); in ioa_add_path()
157 struct path_info *pi; in ioa_status() local
170 pi = path->pscontext; in ioa_status()
171 DMEMIT("%*pb ", cpumask_pr_args(pi->cpumask)); in ioa_status()
183 struct path_info *pi = p->pscontext; in ioa_fail_path() local
185 pi->failed = true; in ioa_fail_path()
190 struct path_info *pi = p->pscontext; in ioa_reinstate_path() local
192 pi->failed = false; in ioa_reinstate_path()
202 struct path_info *pi; in ioa_select_path() local
207 pi = s->path_map[cpu]; in ioa_select_path()
208 if (pi && !pi->failed) in ioa_select_path()
215 if (!pi) in ioa_select_path()
221 pi = s->path_map[i]; in ioa_select_path()
222 if (pi && !pi->failed) in ioa_select_path()
227 pi = s->path_map[i]; in ioa_select_path()
228 if (pi && !pi->failed) in ioa_select_path()
231 pi = NULL; in ioa_select_path()
235 return pi ? pi->path : NULL; in ioa_select_path()