diff options
author | Loic Dachary <ldachary@redhat.com> | 2015-05-17 00:46:38 +0200 |
---|---|---|
committer | Loic Dachary <ldachary@redhat.com> | 2015-05-25 16:49:44 +0200 |
commit | 21036cf086c8a044756b95bc840dd89a9f7a9142 (patch) | |
tree | 3ba88a6590ab9be266a5b33fe8843f31e9693a25 /src/erasure-code/lrc/ErasureCodeLrc.h | |
parent | Merge pull request #4709 from dachary/wip-shec-corpus (diff) | |
download | ceph-21036cf086c8a044756b95bc840dd89a9f7a9142.tar.xz ceph-21036cf086c8a044756b95bc840dd89a9f7a9142.zip |
erasure-code: define the ErasureCodeProfile type
Instead of map<string,string>. Make it a non const when initializing
an ErasureCodeInterface instance so that it can be modified.
Rename parameters into profile for consistency with the user
documentation. The parameters name was chosen before the user interface
was defined. This cosmetic update is made in the context of larger
functional changes to improve error reporting and user interface
consistency.
The init() method are made to accept non const parameters. It is
desirable for them to be able to modify the profile so that is
accurately reflects the values that are used. The caller may use this
information for better error reporting.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
Diffstat (limited to 'src/erasure-code/lrc/ErasureCodeLrc.h')
-rw-r--r-- | src/erasure-code/lrc/ErasureCodeLrc.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/erasure-code/lrc/ErasureCodeLrc.h b/src/erasure-code/lrc/ErasureCodeLrc.h index 1c732737bb2..cd4351b77fe 100644 --- a/src/erasure-code/lrc/ErasureCodeLrc.h +++ b/src/erasure-code/lrc/ErasureCodeLrc.h @@ -54,7 +54,7 @@ public: vector<int> chunks; set<int> chunks_as_set; string chunks_map; - map<string,string> parameters; + ErasureCodeProfile profile; }; vector<Layer> layers; string directory; @@ -108,19 +108,19 @@ public: const map<int, bufferlist> &chunks, map<int, bufferlist> *decoded); - int init(const map<string,string> ¶meters, ostream *ss); + virtual int init(ErasureCodeProfile &profile, ostream *ss); - virtual int parse(const map<string,string> ¶meters, ostream *ss); + virtual int parse(ErasureCodeProfile &profile, ostream *ss); - int parse_kml(map<string,string> ¶meters, ostream *ss); + int parse_kml(ErasureCodeProfile &profile, ostream *ss); - int parse_ruleset(const map<string,string> ¶meters, ostream *ss); + int parse_ruleset(ErasureCodeProfile &profile, ostream *ss); int parse_ruleset_step(string description_string, json_spirit::mArray description, ostream *ss); - int layers_description(const map<string,string> ¶meters, + int layers_description(const ErasureCodeProfile &profile, json_spirit::mArray *description, ostream *ss) const; int layers_parse(string description_string, |