aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlya Dryomov <ilya.dryomov@inktank.com>2013-12-24 14:19:27 -0500
committerIlya Dryomov <ilya.dryomov@inktank.com>2013-12-31 13:32:27 -0500
commit2d8be0bc8bc2dc7d3fc3d322c4db3fdf6c924660 (patch)
tree372756d8c04413d32f08da02e37ae2c947e06739
parentf046bf92080cbdc4a94c6e86698c5a3f10716445 (diff)
crush: attempts -> tries
Reflects ceph.git commit ea3a0bb8b773360d73b8b77fa32115ef091c9857. Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
-rw-r--r--net/ceph/crush/mapper.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/net/ceph/crush/mapper.c b/net/ceph/crush/mapper.c
index 8cde4818e18b..71ce4f12a7c9 100644
--- a/net/ceph/crush/mapper.c
+++ b/net/ceph/crush/mapper.c
@@ -298,8 +298,8 @@ static int crush_choose_firstn(const struct crush_map *map,
298 const __u32 *weight, int weight_max, 298 const __u32 *weight, int weight_max,
299 int x, int numrep, int type, 299 int x, int numrep, int type,
300 int *out, int outpos, 300 int *out, int outpos,
301 unsigned int attempts, 301 unsigned int tries,
302 unsigned int recurse_attempts, 302 unsigned int recurse_tries,
303 unsigned int local_tries, 303 unsigned int local_tries,
304 unsigned int local_fallback_tries, 304 unsigned int local_fallback_tries,
305 int recurse_to_leaf, 305 int recurse_to_leaf,
@@ -388,7 +388,7 @@ static int crush_choose_firstn(const struct crush_map *map,
388 weight, weight_max, 388 weight, weight_max,
389 x, outpos+1, 0, 389 x, outpos+1, 0,
390 out2, outpos, 390 out2, outpos,
391 recurse_attempts, 0, 391 recurse_tries, 0,
392 local_tries, 392 local_tries,
393 local_fallback_tries, 393 local_fallback_tries,
394 0, 394 0,
@@ -423,7 +423,7 @@ reject:
423 flocal <= in->size + local_fallback_tries) 423 flocal <= in->size + local_fallback_tries)
424 /* exhaustive bucket search */ 424 /* exhaustive bucket search */
425 retry_bucket = 1; 425 retry_bucket = 1;
426 else if (ftotal <= attempts) 426 else if (ftotal <= tries)
427 /* then retry descent */ 427 /* then retry descent */
428 retry_descent = 1; 428 retry_descent = 1;
429 else 429 else
@@ -461,8 +461,8 @@ static void crush_choose_indep(const struct crush_map *map,
461 const __u32 *weight, int weight_max, 461 const __u32 *weight, int weight_max,
462 int x, int left, int numrep, int type, 462 int x, int left, int numrep, int type,
463 int *out, int outpos, 463 int *out, int outpos,
464 unsigned int attempts, 464 unsigned int tries,
465 unsigned int recurse_attempts, 465 unsigned int recurse_tries,
466 int recurse_to_leaf, 466 int recurse_to_leaf,
467 int *out2, 467 int *out2,
468 int parent_r) 468 int parent_r)
@@ -487,7 +487,7 @@ static void crush_choose_indep(const struct crush_map *map,
487 out2[rep] = CRUSH_ITEM_UNDEF; 487 out2[rep] = CRUSH_ITEM_UNDEF;
488 } 488 }
489 489
490 for (ftotal = 0; left > 0 && ftotal < attempts; ftotal++) { 490 for (ftotal = 0; left > 0 && ftotal < tries; ftotal++) {
491 for (rep = outpos; rep < endpos; rep++) { 491 for (rep = outpos; rep < endpos; rep++) {
492 if (out[rep] != CRUSH_ITEM_UNDEF) 492 if (out[rep] != CRUSH_ITEM_UNDEF)
493 continue; 493 continue;
@@ -572,7 +572,7 @@ static void crush_choose_indep(const struct crush_map *map,
572 weight, weight_max, 572 weight, weight_max,
573 x, 1, numrep, 0, 573 x, 1, numrep, 0,
574 out2, rep, 574 out2, rep,
575 recurse_attempts, 0, 575 recurse_tries, 0,
576 0, NULL, r); 576 0, NULL, r);
577 if (out2[rep] == CRUSH_ITEM_NONE) { 577 if (out2[rep] == CRUSH_ITEM_NONE) {
578 /* placed nothing; no leaf */ 578 /* placed nothing; no leaf */