• Home
  • Raw
  • Download

Lines Matching refs:i

38 	__u32 i;  in crush_find_rule()  local
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()
46 return i; in crush_find_rule()
73 unsigned int i, s; in bucket_perm_choose() local
89 for (i = 0; i < bucket->size; i++) in bucket_perm_choose()
90 bucket->perm[i] = i; in bucket_perm_choose()
94 for (i = 1; i < bucket->size; i++) in bucket_perm_choose()
95 bucket->perm[i] = i; in bucket_perm_choose()
101 for (i = 0; i < bucket->perm_n; i++) in bucket_perm_choose()
102 dprintk(" perm_choose have %d: %d\n", i, bucket->perm[i]); in bucket_perm_choose()
107 i = crush_hash32_3(bucket->hash, x, bucket->id, p) % in bucket_perm_choose()
109 if (i) { in bucket_perm_choose()
110 unsigned int t = bucket->perm[p + i]; in bucket_perm_choose()
111 bucket->perm[p + i] = bucket->perm[p]; in bucket_perm_choose()
114 dprintk(" perm_choose swap %d with %d\n", p, p+i); in bucket_perm_choose()
118 for (i = 0; i < bucket->size; i++) in bucket_perm_choose()
119 dprintk(" perm_choose %d: %d\n", i, bucket->perm[i]); in bucket_perm_choose()
139 int i; in bucket_list_choose() local
141 for (i = bucket->h.size-1; i >= 0; i--) { in bucket_list_choose()
142 __u64 w = crush_hash32_4(bucket->h.hash,x, bucket->h.items[i], in bucket_list_choose()
147 i, x, r, bucket->h.items[i], bucket->item_weights[i], in bucket_list_choose()
148 bucket->sum_weights[i], w); in bucket_list_choose()
149 w *= bucket->sum_weights[i]; in bucket_list_choose()
152 if (w < bucket->item_weights[i]) in bucket_list_choose()
153 return bucket->h.items[i]; in bucket_list_choose()
224 __u32 i; in bucket_straw_choose() local
229 for (i = 0; i < bucket->h.size; i++) { in bucket_straw_choose()
230 draw = crush_hash32_3(bucket->h.hash, x, bucket->h.items[i], r); in bucket_straw_choose()
232 draw *= bucket->straws[i]; in bucket_straw_choose()
233 if (i == 0 || draw > high_draw) { in bucket_straw_choose()
234 high = i; in bucket_straw_choose()
323 int i; in crush_choose_firstn() local
390 for (i = 0; i < outpos; i++) { in crush_choose_firstn()
391 if (out[i] == item) { in crush_choose_firstn()
497 int i; in crush_choose_indep() local
581 for (i = outpos; i < endpos; i++) { in crush_choose_indep()
582 if (out[i] == item) { in crush_choose_indep()
659 int i, j; in crush_do_rule() local
740 for (i = 0; i < wsize; i++) { in crush_do_rule()
764 map->buckets[-1-w[i]], in crush_do_rule()
783 map->buckets[-1-w[i]], in crush_do_rule()
811 for (i = 0; i < wsize && result_len < result_max; i++) { in crush_do_rule()
812 result[result_len] = w[i]; in crush_do_rule()