This recalculates max_devices and the parent maps.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
id_item[id] = name;
if (verbose) cout << "device " << id << " '" << name << "'" << std::endl;
-
- if (id >= crush.get_max_devices())
- crush.set_max_devices(id+1);
}
void parse_bucket_type(iter_t const& i, CrushWrapper &crush)
int rno = crush_add_rule(crush.crush, rule, -1);
crush.set_rule_name(rno, "data");
- crush.finalize();
- dout(0) << "crush max_devices " << crush.crush->max_devices << dendl;
-
modified = true;
}
}
if (modified) {
+ crush.finalize();
+
if (outfn.empty()) {
cout << me << " successfully built or modified map. Use '-o <file>' to write it out." << std::endl;
} else {