From: Sage Weil Date: Sat, 26 Jun 2021 15:34:34 +0000 (-0400) Subject: crush/CrushTester: drop --ruleset X-Git-Tag: v17.1.0~1398^2~14 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1985fb3b259afed26c212264ba33aee956f5c847;p=ceph.git crush/CrushTester: drop --ruleset Signed-off-by: Sage Weil --- diff --git a/src/crush/CrushTester.cc b/src/crush/CrushTester.cc index d65cc5bba17..07a40b5c2c0 100644 --- a/src/crush/CrushTester.cc +++ b/src/crush/CrushTester.cc @@ -486,10 +486,6 @@ int CrushTester::test() 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); @@ -732,10 +728,6 @@ int CrushTester::compare(CrushWrapper& crush2) 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); diff --git a/src/crush/CrushTester.h b/src/crush/CrushTester.h index b83b1878222..aa3d904b622 100644 --- a/src/crush/CrushTester.h +++ b/src/crush/CrushTester.h @@ -14,7 +14,6 @@ class CrushTester { std::map device_weight; int min_rule, max_rule; - int ruleset; int min_x, max_x; int min_rep, max_rep; int64_t pool_id; @@ -169,7 +168,6 @@ public: 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), @@ -341,10 +339,6 @@ public: 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, diff --git a/src/test/cli/crushtool/help.t b/src/test/cli/crushtool/help.t index f233b9ad49e..d0b41a7863d 100644 --- a/src/test/cli/crushtool/help.t +++ b/src/test/cli/crushtool/help.t @@ -91,7 +91,7 @@ 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 diff --git a/src/tools/crushtool.cc b/src/tools/crushtool.cc index 205af9d22d6..df8d2cf45b3 100644 --- a/src/tools/crushtool.cc +++ b/src/tools/crushtool.cc @@ -199,7 +199,7 @@ void usage() 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"; @@ -783,12 +783,6 @@ int main(int argc, const char **argv) 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;