]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crush/mapper: attempts -> tries
authorSage Weil <sage@inktank.com>
Thu, 19 Dec 2013 05:17:02 +0000 (21:17 -0800)
committerSage Weil <sage@inktank.com>
Thu, 19 Dec 2013 05:22:24 +0000 (21:22 -0800)
Signed-off-by: Sage Weil <sage@inktank.com>
src/crush/mapper.c

index f0e7cce46776c3b79053f9e3a319d4cdae519842..c763da323c2c121bfb386311a33a729bedbb62c8 100644 (file)
@@ -296,8 +296,8 @@ static int crush_choose_firstn(const struct crush_map *map,
                               const __u32 *weight, int weight_max,
                               int x, int numrep, int type,
                               int *out, int outpos,
-                              unsigned attempts,
-                              unsigned recurse_attempts,
+                              unsigned tries,
+                              unsigned recurse_tries,
                               unsigned local_tries,
                               unsigned local_fallback_tries,
                               int recurse_to_leaf,
@@ -386,9 +386,9 @@ static int crush_choose_firstn(const struct crush_map *map,
                                                         weight, weight_max,
                                                         x, outpos+1, 0,
                                                         out2, outpos,
-                                                        recurse_attempts, 0,
-                                                        choose_local_tries,
-                                                        choose_local_fallback_tries,
+                                                        recurse_tries, 0,
+                                                        local_tries,
+                                                        local_fallback_tries,
                                                         0,
                                                         NULL) <= outpos)
                                                        /* didn't get leaf */
@@ -420,7 +420,7 @@ reject:
                                                 flocal <= in->size + local_fallback_tries)
                                                /* exhaustive bucket search */
                                                retry_bucket = 1;
-                                       else if (ftotal <= attempts)
+                                       else if (ftotal <= tries)
                                                /* then retry descent */
                                                retry_descent = 1;
                                        else
@@ -461,7 +461,7 @@ static void crush_choose_indep(const struct crush_map *map,
                               const __u32 *weight, int weight_max,
                               int x, int left, int numrep, int type,
                               int *out, int outpos,
-                              unsigned attempts, unsigned recurse_attempts,
+                              unsigned tries, unsigned recurse_tries,
                               int recurse_to_leaf,
                               int *out2,
                               int parent_r)
@@ -486,7 +486,7 @@ static void crush_choose_indep(const struct crush_map *map,
                        out2[rep] = CRUSH_ITEM_UNDEF;
        }
 
-       for (ftotal = 0; left > 0 && ftotal < attempts; ftotal++) {
+       for (ftotal = 0; left > 0 && ftotal < tries; ftotal++) {
 #ifdef DEBUG_INDEP
                if (out2 && ftotal) {
                        printf("%d %d a: ", ftotal, left);
@@ -585,7 +585,7 @@ static void crush_choose_indep(const struct crush_map *map,
                                                   weight, weight_max,
                                                   x, 1, numrep, 0,
                                                   out2, rep,
-                                                  recurse_attempts, 0,
+                                                  recurse_tries, 0,
                                                   0, NULL, r);
                                                if (out2[rep] == CRUSH_ITEM_NONE) {
                                                        /* placed nothing; no leaf */