summaryrefslogtreecommitdiffstats
path: root/src/test/crush
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2021-06-26 21:11:32 +0200
committerSage Weil <sage@newdream.net>2021-06-29 00:34:31 +0200
commitf95eb04411cd01d19e19564817736298ac866655 (patch)
treeb3ba0c0b43e57e546ff505501db900eb44f24f92 /src/test/crush
parenttest/cli/crushtool: reunumber rulesets in test maps (diff)
downloadceph-f95eb04411cd01d19e19564817736298ac866655.tar.xz
ceph-f95eb04411cd01d19e19564817736298ac866655.zip
crush: eliminate min_size and max_size
We don't use min/max_size for anything any more. Switch to encoding it universally as 1 and 100, and ignoring when we decode. We keep it around for backward compat when (re)encoding without the SERVER_QUINCY feature. Drop the crush_rule_mask struct since the only variable piece now is the type. Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'src/test/crush')
-rw-r--r--src/test/crush/CrushWrapper.cc2
-rw-r--r--src/test/crush/crush.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/test/crush/CrushWrapper.cc b/src/test/crush/CrushWrapper.cc
index def46fbb4b0..07410ac81f1 100644
--- a/src/test/crush/CrushWrapper.cc
+++ b/src/test/crush/CrushWrapper.cc
@@ -1416,7 +1416,7 @@ TEST_F(CrushWrapperTest, try_remap_rule) {
// choose + choose
{
cout << "take + choose + choose + choose + emit" << std::endl;
- int rule = c.add_rule(2, 5, 0, 1, 10);
+ int rule = c.add_rule(2, 5, 0);
ASSERT_EQ(2, rule);
c.set_rule_step_take(rule, 0, bno);
c.set_rule_step_choose_indep(rule, 1, 2, 2);
diff --git a/src/test/crush/crush.cc b/src/test/crush/crush.cc
index f99dedbe836..e9421988d9d 100644
--- a/src/test/crush/crush.cc
+++ b/src/test/crush/crush.cc
@@ -53,7 +53,7 @@ std::unique_ptr<CrushWrapper> build_indep_map(CephContext *cct, int num_rack,
}
int ret;
int ruleno = 0;
- ret = c->add_rule(ruleno, 4, 123, 1, 20);
+ ret = c->add_rule(ruleno, 4, 123);
ceph_assert(ret == ruleno);
ret = c->set_rule_step(ruleno, 0, CRUSH_RULE_SET_CHOOSELEAF_TRIES, 10, 0);
ceph_assert(ret == 0);