Lines Matching refs:map

36 int crush_find_rule(const struct crush_map *map, int ruleset, int type, int size)  in crush_find_rule()  argument
40 for (i = 0; i < map->max_rules; i++) { in crush_find_rule()
41 if (map->rules[i] && in crush_find_rule()
42 map->rules[i]->mask.ruleset == ruleset && in crush_find_rule()
43 map->rules[i]->mask.type == type && in crush_find_rule()
44 map->rules[i]->mask.min_size <= size && in crush_find_rule()
45 map->rules[i]->mask.max_size >= size) in crush_find_rule()
368 static int is_out(const struct crush_map *map, in is_out() argument
403 static int crush_choose_firstn(const struct crush_map *map, in crush_choose_firstn() argument
463 if (item >= map->max_devices) { in crush_choose_firstn()
471 itemtype = map->buckets[-1-item]->type; in crush_choose_firstn()
479 (-1-item) >= map->max_buckets) { in crush_choose_firstn()
484 in = map->buckets[-1-item]; in crush_choose_firstn()
505 if (crush_choose_firstn(map, in crush_choose_firstn()
506 map->buckets[-1-item], in crush_choose_firstn()
528 reject = is_out(map, weight, in crush_choose_firstn()
581 static void crush_choose_indep(const struct crush_map *map, in crush_choose_indep() argument
647 if (item >= map->max_devices) { in crush_choose_indep()
658 itemtype = map->buckets[-1-item]->type; in crush_choose_indep()
666 (-1-item) >= map->max_buckets) { in crush_choose_indep()
675 in = map->buckets[-1-item]; in crush_choose_indep()
692 crush_choose_indep(map, in crush_choose_indep()
693 map->buckets[-1-item], in crush_choose_indep()
711 is_out(map, weight, weight_max, item, x)) in crush_choose_indep()
742 int crush_do_rule(const struct crush_map *map, in crush_do_rule() argument
766 int choose_tries = map->choose_total_tries + 1; in crush_do_rule()
772 int choose_local_retries = map->choose_local_tries; in crush_do_rule()
773 int choose_local_fallback_retries = map->choose_local_fallback_tries; in crush_do_rule()
775 int vary_r = map->chooseleaf_vary_r; in crush_do_rule()
777 if ((__u32)ruleno >= map->max_rules) { in crush_do_rule()
782 rule = map->rules[ruleno]; in crush_do_rule()
858 else if (map->chooseleaf_descend_once) in crush_do_rule()
863 map, in crush_do_rule()
864 map->buckets[-1-w[i]], in crush_do_rule()
882 map, in crush_do_rule()
883 map->buckets[-1-w[i]], in crush_do_rule()