summaryrefslogtreecommitdiffstats
path: root/src/erasure-code
diff options
context:
space:
mode:
authorSamuel Just <rexludorum@gmail.com>2024-01-26 21:23:03 +0100
committerSamuel Just <sjust@redhat.com>2024-01-26 21:32:05 +0100
commita5ce9c3863f98992193a9913344a046112c28dea (patch)
tree2582ce1ca84c0690c7a2bb33112e2d1de08588ac /src/erasure-code
parentMerge pull request #55096 from athanatos/sjust/for-review/wip-crush-msr (diff)
downloadceph-a5ce9c3863f98992193a9913344a046112c28dea.tar.xz
ceph-a5ce9c3863f98992193a9913344a046112c28dea.zip
Revert "crush: add multistep retry rules"
This PR was merged by accident before it was ready. Let's revert for now and open a new PR. Signed-off-by: Samuel Just <sjust@redhat.com>
Diffstat (limited to 'src/erasure-code')
-rw-r--r--src/erasure-code/ErasureCode.cc46
-rw-r--r--src/erasure-code/ErasureCode.h2
2 files changed, 13 insertions, 35 deletions
diff --git a/src/erasure-code/ErasureCode.cc b/src/erasure-code/ErasureCode.cc
index 928d05f2adb..5212baee251 100644
--- a/src/erasure-code/ErasureCode.cc
+++ b/src/erasure-code/ErasureCode.cc
@@ -52,12 +52,6 @@ int ErasureCode::init(
err |= to_string("crush-failure-domain", profile,
&rule_failure_domain,
DEFAULT_RULE_FAILURE_DOMAIN, ss);
- err |= to_int("crush-osds-per-failure-domain", profile,
- &rule_osds_per_failure_domain,
- "0", ss);
- err |= to_int("crush-num-failure-domains", profile,
- &rule_num_failure_domains,
- "0", ss);
err |= to_string("crush-device-class", profile,
&rule_device_class,
"", ss);
@@ -72,33 +66,19 @@ int ErasureCode::create_rule(
CrushWrapper &crush,
std::ostream *ss) const
{
- if (rule_osds_per_failure_domain <= 1) {
- return crush.add_simple_rule(
- name,
- rule_root,
- rule_failure_domain,
- rule_num_failure_domains,
- rule_device_class,
- "indep",
- pg_pool_t::TYPE_ERASURE,
- ss);
- } else {
- if (rule_num_failure_domains < 1) {
- if (ss) {
- *ss << "crush-num-failure-domains " << rule_num_failure_domains
- << " must be >= 1 if crush-osds-per-failure-domain specified";
- return -EINVAL;
- }
- }
- return crush.add_indep_multi_osd_per_failure_domain_rule(
- name,
- rule_root,
- rule_failure_domain,
- rule_num_failure_domains,
- rule_osds_per_failure_domain,
- rule_device_class,
- ss);
- }
+ int ruleid = crush.add_simple_rule(
+ name,
+ rule_root,
+ rule_failure_domain,
+ rule_device_class,
+ "indep",
+ pg_pool_t::TYPE_ERASURE,
+ ss);
+
+ if (ruleid < 0)
+ return ruleid;
+
+ return ruleid;
}
int ErasureCode::sanity_check_k_m(int k, int m, ostream *ss)
diff --git a/src/erasure-code/ErasureCode.h b/src/erasure-code/ErasureCode.h
index fd6d1a41f71..c246d5dc6b6 100644
--- a/src/erasure-code/ErasureCode.h
+++ b/src/erasure-code/ErasureCode.h
@@ -37,8 +37,6 @@ namespace ceph {
std::string rule_root;
std::string rule_failure_domain;
std::string rule_device_class;
- int rule_osds_per_failure_domain = -1;
- int rule_num_failure_domains = -1;
~ErasureCode() override {}