mirror of
https://github.com/ceph/ceph
synced 2024-12-29 15:03:33 +00:00
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:
commit
af5a9b37f2
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user