crush/CrushWrapper: add bucket_set_alg()

Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2017-10-21 12:59:16 -05:00
parent e6668b5646
commit edc411ee4c
2 changed files with 11 additions and 0 deletions

View File

@ -1842,6 +1842,16 @@ int CrushWrapper::bucket_remove_item(crush_bucket *bucket, int item)
return 0;
}
int CrushWrapper::bucket_set_alg(int bid, int alg)
{
crush_bucket *b = get_bucket(bid);
if (!b) {
return -ENOENT;
}
b->alg = alg;
return 0;
}
int CrushWrapper::update_device_class(int id,
const string& class_name,
const string& name,

View File

@ -1252,6 +1252,7 @@ public:
crush_finalize(crush);
have_uniform_rules = !has_legacy_rule_ids();
}
int bucket_set_alg(int id, int alg);
int update_device_class(int id, const string& class_name, const string& name, ostream *ss);
int remove_device_class(CephContext *cct, int id, ostream *ss);