Skip to content

Commit 2d8be0b

Browse files
committed
crush: attempts -> tries
Reflects ceph.git commit ea3a0bb8b773360d73b8b77fa32115ef091c9857. Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
1 parent f046bf9 commit 2d8be0b

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

‎net/ceph/crush/mapper.c‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,8 @@ static int crush_choose_firstn(const struct crush_map *map,
298298
const __u32 *weight, int weight_max,
299299
int x, int numrep, int type,
300300
int *out, int outpos,
301-
unsigned int attempts,
302-
unsigned int recurse_attempts,
301+
unsigned int tries,
302+
unsigned int recurse_tries,
303303
unsigned int local_tries,
304304
unsigned int local_fallback_tries,
305305
int recurse_to_leaf,
@@ -388,7 +388,7 @@ static int crush_choose_firstn(const struct crush_map *map,
388388
weight, weight_max,
389389
x, outpos+1, 0,
390390
out2, outpos,
391-
recurse_attempts, 0,
391+
recurse_tries, 0,
392392
local_tries,
393393
local_fallback_tries,
394394
0,
@@ -423,7 +423,7 @@ static int crush_choose_firstn(const struct crush_map *map,
423423
flocal <= in->size + local_fallback_tries)
424424
/* exhaustive bucket search */
425425
retry_bucket = 1;
426-
else if (ftotal <= attempts)
426+
else if (ftotal <= tries)
427427
/* then retry descent */
428428
retry_descent = 1;
429429
else
@@ -461,8 +461,8 @@ static void crush_choose_indep(const struct crush_map *map,
461461
const __u32 *weight, int weight_max,
462462
int x, int left, int numrep, int type,
463463
int *out, int outpos,
464-
unsigned int attempts,
465-
unsigned int recurse_attempts,
464+
unsigned int tries,
465+
unsigned int recurse_tries,
466466
int recurse_to_leaf,
467467
int *out2,
468468
int parent_r)
@@ -487,7 +487,7 @@ static void crush_choose_indep(const struct crush_map *map,
487487
out2[rep] = CRUSH_ITEM_UNDEF;
488488
}
489489

490-
for (ftotal = 0; left > 0 && ftotal < attempts; ftotal++) {
490+
for (ftotal = 0; left > 0 && ftotal < tries; ftotal++) {
491491
for (rep = outpos; rep < endpos; rep++) {
492492
if (out[rep] != CRUSH_ITEM_UNDEF)
493493
continue;
@@ -572,7 +572,7 @@ static void crush_choose_indep(const struct crush_map *map,
572572
weight, weight_max,
573573
x, 1, numrep, 0,
574574
out2, rep,
575-
recurse_attempts, 0,
575+
recurse_tries, 0,
576576
0, NULL, r);
577577
if (out2[rep] == CRUSH_ITEM_NONE) {
578578
/* placed nothing; no leaf */

0 commit comments

Comments
 (0)