We'll use this for feature bit compat checks with clients and osds.
Signed-off-by: Sage Weil <sage@redhat.com>
return false;
}
+bool CrushWrapper::has_chooseargs() const
+{
+ return !choose_args.empty();
+}
+
+bool CrushWrapper::has_incompat_chooseargs() const
+{
+ // FIXME: if the chooseargs all have 1 position *and* do not remap IDs then
+ // we can fabricate a compatible crush map for legacy clients by swapping the
+ // choose_args weights in for the real weights. until then,
+ return has_chooseargs();
+}
+
int CrushWrapper::split_id_class(int i, int *idout, int *classout) const
{
if (!item_exists(i))
bool has_v3_rules() const;
bool has_v4_buckets() const;
bool has_v5_rules() const;
+ bool has_chooseargs() const; // any chooseargs
+ bool has_incompat_chooseargs() const; // chooseargs that can't be made compat
bool is_v2_rule(unsigned ruleid) const;
bool is_v3_rule(unsigned ruleid) const;