Commit cc10df4a authored by Ilya Dryomov's avatar Ilya Dryomov

crush: add SET_CHOOSE_TRIES rule step

Since we can specify the recursive retries in a rule, we may as well also
specify the non-recursive tries too for completeness.

Reflects ceph.git commit d1b97462cffccc871914859eaee562f2786abfd1.
Signed-off-by: default avatarIlya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: default avatarSage Weil <sage@inktank.com>
parent f18650ac
...@@ -47,7 +47,8 @@ enum { ...@@ -47,7 +47,8 @@ enum {
CRUSH_RULE_CHOOSE_LEAF_FIRSTN = 6, CRUSH_RULE_CHOOSE_LEAF_FIRSTN = 6,
CRUSH_RULE_CHOOSE_LEAF_INDEP = 7, CRUSH_RULE_CHOOSE_LEAF_INDEP = 7,
CRUSH_RULE_SET_CHOOSE_LEAF_TRIES = 9, CRUSH_RULE_SET_CHOOSE_TRIES = 8, /* override choose_total_tries */
CRUSH_RULE_SET_CHOOSE_LEAF_TRIES = 9, /* override chooseleaf_descend_once */
}; };
/* /*
......
...@@ -661,6 +661,11 @@ int crush_do_rule(const struct crush_map *map, ...@@ -661,6 +661,11 @@ int crush_do_rule(const struct crush_map *map,
wsize = 1; wsize = 1;
break; break;
case CRUSH_RULE_SET_CHOOSE_TRIES:
if (curstep->arg1 > 0)
choose_tries = curstep->arg1;
break;
case CRUSH_RULE_SET_CHOOSE_LEAF_TRIES: case CRUSH_RULE_SET_CHOOSE_LEAF_TRIES:
if (curstep->arg1 > 0) if (curstep->arg1 > 0)
choose_leaf_tries = curstep->arg1; choose_leaf_tries = curstep->arg1;
......
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