Commit 2d8be0bc authored by Ilya Dryomov's avatar Ilya Dryomov

crush: attempts -> tries

Reflects ceph.git commit ea3a0bb8b773360d73b8b77fa32115ef091c9857.
Signed-off-by: default avatarIlya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: default avatarSage Weil <sage@inktank.com>
parent f046bf92
...@@ -298,8 +298,8 @@ static int crush_choose_firstn(const struct crush_map *map, ...@@ -298,8 +298,8 @@ static int crush_choose_firstn(const struct crush_map *map,
const __u32 *weight, int weight_max, const __u32 *weight, int weight_max,
int x, int numrep, int type, int x, int numrep, int type,
int *out, int outpos, int *out, int outpos,
unsigned int attempts, unsigned int tries,
unsigned int recurse_attempts, unsigned int recurse_tries,
unsigned int local_tries, unsigned int local_tries,
unsigned int local_fallback_tries, unsigned int local_fallback_tries,
int recurse_to_leaf, int recurse_to_leaf,
...@@ -388,7 +388,7 @@ static int crush_choose_firstn(const struct crush_map *map, ...@@ -388,7 +388,7 @@ static int crush_choose_firstn(const struct crush_map *map,
weight, weight_max, weight, weight_max,
x, outpos+1, 0, x, outpos+1, 0,
out2, outpos, out2, outpos,
recurse_attempts, 0, recurse_tries, 0,
local_tries, local_tries,
local_fallback_tries, local_fallback_tries,
0, 0,
...@@ -423,7 +423,7 @@ static int crush_choose_firstn(const struct crush_map *map, ...@@ -423,7 +423,7 @@ static int crush_choose_firstn(const struct crush_map *map,
flocal <= in->size + local_fallback_tries) flocal <= in->size + local_fallback_tries)
/* exhaustive bucket search */ /* exhaustive bucket search */
retry_bucket = 1; retry_bucket = 1;
else if (ftotal <= attempts) else if (ftotal <= tries)
/* then retry descent */ /* then retry descent */
retry_descent = 1; retry_descent = 1;
else else
...@@ -461,8 +461,8 @@ static void crush_choose_indep(const struct crush_map *map, ...@@ -461,8 +461,8 @@ static void crush_choose_indep(const struct crush_map *map,
const __u32 *weight, int weight_max, const __u32 *weight, int weight_max,
int x, int left, int numrep, int type, int x, int left, int numrep, int type,
int *out, int outpos, int *out, int outpos,
unsigned int attempts, unsigned int tries,
unsigned int recurse_attempts, unsigned int recurse_tries,
int recurse_to_leaf, int recurse_to_leaf,
int *out2, int *out2,
int parent_r) int parent_r)
...@@ -487,7 +487,7 @@ static void crush_choose_indep(const struct crush_map *map, ...@@ -487,7 +487,7 @@ static void crush_choose_indep(const struct crush_map *map,
out2[rep] = CRUSH_ITEM_UNDEF; out2[rep] = CRUSH_ITEM_UNDEF;
} }
for (ftotal = 0; left > 0 && ftotal < attempts; ftotal++) { for (ftotal = 0; left > 0 && ftotal < tries; ftotal++) {
for (rep = outpos; rep < endpos; rep++) { for (rep = outpos; rep < endpos; rep++) {
if (out[rep] != CRUSH_ITEM_UNDEF) if (out[rep] != CRUSH_ITEM_UNDEF)
continue; continue;
...@@ -572,7 +572,7 @@ static void crush_choose_indep(const struct crush_map *map, ...@@ -572,7 +572,7 @@ static void crush_choose_indep(const struct crush_map *map,
weight, weight_max, weight, weight_max,
x, 1, numrep, 0, x, 1, numrep, 0,
out2, rep, out2, rep,
recurse_attempts, 0, recurse_tries, 0,
0, NULL, r); 0, NULL, r);
if (out2[rep] == CRUSH_ITEM_NONE) { if (out2[rep] == CRUSH_ITEM_NONE) {
/* placed nothing; no leaf */ /* placed nothing; no leaf */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment