We should set the max_devices value for a new device. (Actually,
finalize() will fix this for us on decode, but better to be
pendantic.)
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit
6aa7c885e57070c52ccecec1ceca9a53e878d30c)
oss << "osd." << osd;
string name = oss.str();
+ if (newcrush.get_max_devices() < osd + 1) {
+ newcrush.set_max_devices(osd + 1);
+ }
string action;
if (newcrush.item_exists(osd)) {
action = "updating";