}
public:
- CrushWrapper() : crush(0) {}
+ CrushWrapper() : crush(0), have_rmaps(false) {}
~CrushWrapper() {
if (crush) crush_destroy(crush);
}
int add_bucket(int bucketno, int alg, int type, int size,
int *items, int *weights) {
crush_bucket *b = crush_make_bucket(alg, type, size, items, weights);
-
return crush_add_bucket(crush, bucketno, b);
}
if (map->buckets) {
for (b=0; b<map->max_buckets; b++) {
if (map->buckets[b] == 0) continue;
- switch (map->buckets[b]->type) {
+ switch (map->buckets[b]->alg) {
case CRUSH_BUCKET_UNIFORM:
crush_destroy_bucket_uniform((struct crush_bucket_uniform*)map->buckets[b]);
break;