This hides device names when they don't appear in the hierarchy,
e.g. after setting a name and class for a new device that hasn't
yet been put in the tree.
Signed-off-by: Sage Weil <sage@redhat.com>
void finalize() {
assert(crush);
crush_finalize(crush);
+ if (!name_map.empty() &&
+ name_map.rbegin()->first >= crush->max_devices) {
+ crush->max_devices = name_map.rbegin()->first + 1;
+ }
have_uniform_rules = !has_legacy_rule_ids();
}
int bucket_set_alg(int id, int alg);