The crushmap built by crushtool cannot be used directly as the name of type 0 is not specified.
We may decompile the crushmap(it will automatically add type 0) and then recompile it to make it usable, but that's extra effort.
Signed-off-by: Sangdi Xu <xu.sangdi@h3c.com>
device 24 osd.24
# types
- type 0 device
+ type 0 osd
type 1 node
type 2 rack
type 3 root
device 0 osd.0
# types
- type 0 device
+ type 0 osd
type 1 root
# buckets
crush.set_item_name(i, "osd." + stringify(i));
}
+ crush.set_type_name(0, "osd");
int type = 1;
for (vector<layer_t>::iterator p = layers.begin(); p != layers.end(); ++p, type++) {
layer_t &l = *p;