err << "rule " << r << " dne" << std::endl;
continue;
}
- if (ruleset >= 0 &&
- crush.get_rule_mask_ruleset(r) != ruleset) {
- continue;
- }
int minr = min_rep, maxr = max_rep;
if (min_rep < 0 || max_rep < 0) {
minr = crush.get_rule_mask_min_size(r);
err << "rule " << r << " dne" << std::endl;
continue;
}
- if (ruleset >= 0 &&
- crush.get_rule_mask_ruleset(r) != ruleset) {
- continue;
- }
int minr = min_rep, maxr = max_rep;
if (min_rep < 0 || max_rep < 0) {
minr = crush.get_rule_mask_min_size(r);
std::map<int, int> device_weight;
int min_rule, max_rule;
- int ruleset;
int min_x, max_x;
int min_rep, max_rep;
int64_t pool_id;
CrushTester(CrushWrapper& c, std::ostream& eo)
: crush(c), err(eo),
min_rule(-1), max_rule(-1),
- ruleset(-1),
min_x(-1), max_x(-1),
min_rep(-1), max_rep(-1),
pool_id(-1),
min_rule = max_rule = rule;
}
- void set_ruleset(int rs) {
- ruleset = rs;
- }
-
/**
* check if any bucket/nodes is referencing an unknown name or type
* @param max_id rejects any non-bucket items with id less than this number,
show location for given device id
-i mapfn --test test a range of inputs on the map
[--min-x x] [--max-x x] [--x x]
- [--min-rule r] [--max-rule r] [--rule r] [--ruleset rs]
+ [--min-rule r] [--max-rule r] [--rule r]
[--num-rep n]
[--pool-id n] specifies pool id
[--batches b] split the CRUSH mapping into b > 1 rounds
cout << " show location for given device id\n";
cout << " -i mapfn --test test a range of inputs on the map\n";
cout << " [--min-x x] [--max-x x] [--x x]\n";
- cout << " [--min-rule r] [--max-rule r] [--rule r] [--ruleset rs]\n";
+ cout << " [--min-rule r] [--max-rule r] [--rule r]\n";
cout << " [--num-rep n]\n";
cout << " [--pool-id n] specifies pool id\n";
cout << " [--batches b] split the CRUSH mapping into b > 1 rounds\n";
return EXIT_FAILURE;
}
tester.set_rule(x);
- } else if (ceph_argparse_witharg(args, i, &x, err, "--ruleset", (char*)NULL)) {
- if (!err.str().empty()) {
- cerr << err.str() << std::endl;
- return EXIT_FAILURE;
- }
- tester.set_ruleset(x);
} else if (ceph_argparse_witharg(args, i, &x, err, "--batches", (char*)NULL)) {
if (!err.str().empty()) {
cerr << err.str() << std::endl;