summaryrefslogtreecommitdiffstats
path: root/src/erasure-code/lrc/ErasureCodeLrc.h
diff options
context:
space:
mode:
authorSage Weil <sage@redhat.com>2017-06-30 20:59:39 +0200
committerSage Weil <sage@redhat.com>2017-07-06 21:01:03 +0200
commitdc7a2aaf7a34b1e6af0c7b79dc44a69974c1da23 (patch)
tree67474598cc10f1b06beca6f914d077cd51455c70 /src/erasure-code/lrc/ErasureCodeLrc.h
parentmon,crush: 'osd crush rule create-replicated ...' (diff)
downloadceph-dc7a2aaf7a34b1e6af0c7b79dc44a69974c1da23.tar.xz
ceph-dc7a2aaf7a34b1e6af0c7b79dc44a69974c1da23.zip
erasure-code: ruleset-* -> crush-*
1) ruleset is an obsolete term, and 2) crush-{rule,failure-domain,...} is more descriptive. Note that we are changing the names of the erasure code profile keys from ruleset-* to crush-*. We will update this on upgrade when the luminous flag is set, but that means that during mon upgrade you cannot create EC pools that use these fields. When the upgrade completes (users sets require_osd_release = luminous) existing ec profiles are updated automatically. Signed-off-by: Sage Weil <sage@redhat.com>
Diffstat (limited to 'src/erasure-code/lrc/ErasureCodeLrc.h')
-rw-r--r--src/erasure-code/lrc/ErasureCodeLrc.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/erasure-code/lrc/ErasureCodeLrc.h b/src/erasure-code/lrc/ErasureCodeLrc.h
index fac4d54a5ab..a92bff23986 100644
--- a/src/erasure-code/lrc/ErasureCodeLrc.h
+++ b/src/erasure-code/lrc/ErasureCodeLrc.h
@@ -35,9 +35,9 @@
#define ERROR_LRC_COUNT_CONSTRAINT -(MAX_ERRNO + 11)
#define ERROR_LRC_CONFIG_OPTIONS -(MAX_ERRNO + 12)
#define ERROR_LRC_LAYERS_COUNT -(MAX_ERRNO + 13)
-#define ERROR_LRC_RULESET_OP -(MAX_ERRNO + 14)
-#define ERROR_LRC_RULESET_TYPE -(MAX_ERRNO + 15)
-#define ERROR_LRC_RULESET_N -(MAX_ERRNO + 16)
+#define ERROR_LRC_RULE_OP -(MAX_ERRNO + 14)
+#define ERROR_LRC_RULE_TYPE -(MAX_ERRNO + 15)
+#define ERROR_LRC_RULE_N -(MAX_ERRNO + 16)
#define ERROR_LRC_ALL_OR_NOTHING -(MAX_ERRNO + 17)
#define ERROR_LRC_GENERATED -(MAX_ERRNO + 18)
#define ERROR_LRC_K_M_MODULO -(MAX_ERRNO + 19)
@@ -62,7 +62,7 @@ public:
std::string directory;
unsigned int chunk_count;
unsigned int data_chunk_count;
- std::string ruleset_root;
+ std::string rule_root;
struct Step {
Step(std::string _op, std::string _type, int _n) :
op(_op),
@@ -72,13 +72,13 @@ public:
std::string type;
int n;
};
- std::vector<Step> ruleset_steps;
+ std::vector<Step> rule_steps;
explicit ErasureCodeLrc(const std::string &dir)
: directory(dir),
- chunk_count(0), data_chunk_count(0), ruleset_root("default")
+ chunk_count(0), data_chunk_count(0), rule_root("default")
{
- ruleset_steps.push_back(Step("chooseleaf", "host", 0));
+ rule_steps.push_back(Step("chooseleaf", "host", 0));
}
~ErasureCodeLrc() override {}
@@ -90,7 +90,7 @@ public:
const std::set<int> &available,
std::set<int> *minimum) override;
- int create_ruleset(const std::string &name,
+ int create_rule(const std::string &name,
CrushWrapper &crush,
std::ostream *ss) const override;
@@ -117,11 +117,11 @@ public:
int parse_kml(ErasureCodeProfile &profile, std::ostream *ss);
- int parse_ruleset(ErasureCodeProfile &profile, std::ostream *ss);
+ int parse_rule(ErasureCodeProfile &profile, std::ostream *ss);
- int parse_ruleset_step(std::string description_string,
- json_spirit::mArray description,
- std::ostream *ss);
+ int parse_rule_step(std::string description_string,
+ json_spirit::mArray description,
+ std::ostream *ss);
int layers_description(const ErasureCodeProfile &profile,
json_spirit::mArray *description,