tunable chooseleaf_descend_once 1
# devices
- device 0 device0
+ device 0 osd.0
# types
type 0 device
\t# weight 1.000 (esc)
\talg straw (esc)
\thash 0\t# rjenkins1 (esc)
- \titem device0 weight 1.000 (esc)
+ \titem osd.0 weight 1.000 (esc)
}
# rules
#include "common/config.h"
#include "common/ceph_argparse.h"
+#include "include/stringify.h"
#include "global/global_context.h"
#include "global/global_init.h"
#include "osd/OSDMap.h"
vector<int> lower_items;
vector<int> lower_weights;
+ crush.set_max_devices(num_osds);
for (int i=0; i<num_osds; i++) {
lower_items.push_back(i);
lower_weights.push_back(0x10000);
+ crush.set_item_name(i, "osd." + stringify(i));
}
- crush.set_max_devices(num_osds);
int type = 1;
for (vector<layer_t>::iterator p = layers.begin(); p != layers.end(); ++p, type++) {