Lines Matching refs:arg_map

216 	struct crush_choose_arg_map *arg_map;  in alloc_choose_arg_map()  local
218 arg_map = kzalloc(sizeof(*arg_map), GFP_NOIO); in alloc_choose_arg_map()
219 if (!arg_map) in alloc_choose_arg_map()
222 RB_CLEAR_NODE(&arg_map->node); in alloc_choose_arg_map()
223 return arg_map; in alloc_choose_arg_map()
226 static void free_choose_arg_map(struct crush_choose_arg_map *arg_map) in free_choose_arg_map() argument
228 if (arg_map) { in free_choose_arg_map()
231 WARN_ON(!RB_EMPTY_NODE(&arg_map->node)); in free_choose_arg_map()
233 for (i = 0; i < arg_map->size; i++) { in free_choose_arg_map()
234 struct crush_choose_arg *arg = &arg_map->args[i]; in free_choose_arg_map()
241 kfree(arg_map->args); in free_choose_arg_map()
242 kfree(arg_map); in free_choose_arg_map()
252 struct crush_choose_arg_map *arg_map = in clear_choose_args() local
256 erase_choose_arg_map(&c->choose_args, arg_map); in clear_choose_args()
257 free_choose_arg_map(arg_map); in clear_choose_args()
336 struct crush_choose_arg_map *arg_map = NULL; in decode_choose_args() local
342 arg_map = alloc_choose_arg_map(); in decode_choose_args()
343 if (!arg_map) { in decode_choose_args()
348 ceph_decode_64_safe(p, end, arg_map->choose_args_index, in decode_choose_args()
350 arg_map->size = c->max_buckets; in decode_choose_args()
351 arg_map->args = kcalloc(arg_map->size, sizeof(*arg_map->args), in decode_choose_args()
353 if (!arg_map->args) { in decode_choose_args()
364 if (bucket_index >= arg_map->size) in decode_choose_args()
367 arg = &arg_map->args[bucket_index]; in decode_choose_args()
377 insert_choose_arg_map(&c->choose_args, arg_map); in decode_choose_args()
385 free_choose_arg_map(arg_map); in decode_choose_args()
2460 struct crush_choose_arg_map *arg_map; in do_crush() local
2466 arg_map = lookup_choose_arg_map(&map->crush->choose_args, in do_crush()
2468 if (!arg_map) in do_crush()
2469 arg_map = lookup_choose_arg_map(&map->crush->choose_args, in do_crush()
2475 arg_map ? arg_map->args : NULL); in do_crush()