}
int steps = 3;
if (mode == "indep")
- steps = 4;
+ steps = 5;
int min_rep = mode == "firstn" ? 1 : 3;
int max_rep = mode == "firstn" ? 10 : 20;
//set the ruleset the same as rule_id(rno)
crush_rule *rule = crush_make_rule(steps, rno, rule_type, min_rep, max_rep);
assert(rule);
int step = 0;
- if (mode == "indep")
+ if (mode == "indep") {
crush_rule_set_step(rule, step++, CRUSH_RULE_SET_CHOOSELEAF_TRIES, 5, 0);
+ crush_rule_set_step(rule, step++, CRUSH_RULE_SET_CHOOSE_TRIES, 100, 0);
+ }
crush_rule_set_step(rule, step++, CRUSH_RULE_TAKE, root, 0);
if (type)
crush_rule_set_step(rule, step++,
}
ruleset = rno;
- int steps = 3 + ruleset_steps.size();
+ int steps = 4 + ruleset_steps.size();
int min_rep = 3;
int max_rep = 30;
int ret;
ret = crush.set_rule_step(rno, step++, CRUSH_RULE_SET_CHOOSELEAF_TRIES, 5, 0);
assert(ret == 0);
+ ret = crush.set_rule_step(rno, step++, CRUSH_RULE_SET_CHOOSE_TRIES, 100, 0);
+ assert(ret == 0);
ret = crush.set_rule_step(rno, step++, CRUSH_RULE_TAKE, root, 0);
assert(ret == 0);
// [ [ "choose", "rack", 2 ],