Commit 917edad5 authored by Ilya Dryomov's avatar Ilya Dryomov

crush: CHOOSE_LEAF -> CHOOSELEAF throughout

This aligns the internal identifier names with the user-visible names in
the decompiled crush map language.

Reflects ceph.git commit caa0e22e15e4226c3671318ba1f61314bf6da2a6.
Signed-off-by: default avatarIlya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: default avatarSage Weil <sage@inktank.com>
parent cc10df4a
...@@ -44,11 +44,11 @@ enum { ...@@ -44,11 +44,11 @@ enum {
/* arg2 = type */ /* arg2 = type */
CRUSH_RULE_CHOOSE_INDEP = 3, /* same */ CRUSH_RULE_CHOOSE_INDEP = 3, /* same */
CRUSH_RULE_EMIT = 4, /* no args */ CRUSH_RULE_EMIT = 4, /* no args */
CRUSH_RULE_CHOOSE_LEAF_FIRSTN = 6, CRUSH_RULE_CHOOSELEAF_FIRSTN = 6,
CRUSH_RULE_CHOOSE_LEAF_INDEP = 7, CRUSH_RULE_CHOOSELEAF_INDEP = 7,
CRUSH_RULE_SET_CHOOSE_TRIES = 8, /* override choose_total_tries */ CRUSH_RULE_SET_CHOOSE_TRIES = 8, /* override choose_total_tries */
CRUSH_RULE_SET_CHOOSE_LEAF_TRIES = 9, /* override chooseleaf_descend_once */ CRUSH_RULE_SET_CHOOSELEAF_TRIES = 9, /* override chooseleaf_descend_once */
}; };
/* /*
......
...@@ -666,25 +666,25 @@ int crush_do_rule(const struct crush_map *map, ...@@ -666,25 +666,25 @@ int crush_do_rule(const struct crush_map *map,
choose_tries = curstep->arg1; choose_tries = curstep->arg1;
break; break;
case CRUSH_RULE_SET_CHOOSE_LEAF_TRIES: case CRUSH_RULE_SET_CHOOSELEAF_TRIES:
if (curstep->arg1 > 0) if (curstep->arg1 > 0)
choose_leaf_tries = curstep->arg1; choose_leaf_tries = curstep->arg1;
break; break;
case CRUSH_RULE_CHOOSE_LEAF_FIRSTN: case CRUSH_RULE_CHOOSELEAF_FIRSTN:
case CRUSH_RULE_CHOOSE_FIRSTN: case CRUSH_RULE_CHOOSE_FIRSTN:
firstn = 1; firstn = 1;
/* fall through */ /* fall through */
case CRUSH_RULE_CHOOSE_LEAF_INDEP: case CRUSH_RULE_CHOOSELEAF_INDEP:
case CRUSH_RULE_CHOOSE_INDEP: case CRUSH_RULE_CHOOSE_INDEP:
if (wsize == 0) if (wsize == 0)
break; break;
recurse_to_leaf = recurse_to_leaf =
curstep->op == curstep->op ==
CRUSH_RULE_CHOOSE_LEAF_FIRSTN || CRUSH_RULE_CHOOSELEAF_FIRSTN ||
curstep->op == curstep->op ==
CRUSH_RULE_CHOOSE_LEAF_INDEP; CRUSH_RULE_CHOOSELEAF_INDEP;
/* reset output */ /* reset output */
osize = 0; osize = 0;
......
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