Merge pull request #224 from ceph/wip-mon-crush

Wip mon crush

Reviewed-by: Dan Mick <dan.mick@inktank.com>
This commit is contained in:
Sage Weil 2013-04-19 10:20:18 -07:00
commit af5a9b37f2

View File

@ -2691,7 +2691,8 @@ bool OSDMonitor::prepare_command(MMonCommand *m)
return true;
}
} else {
ss << "no need to move item id " << id << " name '" << name << "' to location " << loc << " in crush map";
ss << "no need to move item id " << id << " name '" << name << "' to location " << loc << " in crush map";
err = 0;
}
} while (false);
}
@ -2812,6 +2813,7 @@ bool OSDMonitor::prepare_command(MMonCommand *m)
if (newcrush.rule_exists(name)) {
ss << "rule " << name << " already exists";
err = 0;
} else {
int rule = newcrush.add_simple_rule(name, root, type);
if (rule < 0) {
@ -2843,6 +2845,7 @@ bool OSDMonitor::prepare_command(MMonCommand *m)
if (!newcrush.rule_exists(name)) {
ss << "rule " << name << " does not exist";
err = 0;
} else {
int ruleno = newcrush.get_rule_id(name);
assert(ruleno >= 0);