This mimics the feature bit enforcement in OSDMap.cc but it does it based
on the version string. This is useful when you have CRUSH tunables that
aren't mapped to a named profile.
Signed-off-by: Sage Weil <sage@redhat.com>
f->dump_int("optimal_tunables", (int)has_optimal_tunables());
f->dump_int("legacy_tunables", (int)has_legacy_tunables());
+ // be helpful about minimum version required
+ f->dump_string("minimum_required_version", get_min_required_version());
+
f->dump_int("require_feature_tunables", (int)has_nondefault_tunables());
f->dump_int("require_feature_tunables2", (int)has_nondefault_tunables2());
f->dump_int("has_v2_rules", (int)has_v2_rules());
bool is_v3_rule(unsigned ruleid) const;
bool is_v5_rule(unsigned ruleid) const;
+ string get_min_required_version() const {
+ if (has_v5_rules() || has_nondefault_tunables5())
+ return "jewel";
+ else if (has_v4_buckets())
+ return "hammer";
+ else if (has_nondefault_tunables3())
+ return "firefly";
+ else if (has_nondefault_tunables2() || has_nondefault_tunables())
+ return "bobtail";
+ else
+ return "argonaut";
+ }
+
// default bucket types
unsigned get_default_bucket_alg() const {
// in order of preference