diff options
author | Sage Weil <sage@inktank.com> | 2012-06-08 10:56:57 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2012-06-08 10:58:12 -0700 |
commit | 740aa3dfbd8b92527dc9bb13521d0575a692d4e4 (patch) | |
tree | 3cee1d1082eba9e20fa2124dc33b2c29648ad3d8 /src/crush/CrushCompiler.h | |
parent | 1a2959edd672b4993952ca974b1c5194cdf0b643 (diff) | |
download | ceph-740aa3dfbd8b92527dc9bb13521d0575a692d4e4.tar.gz |
crush: compile/decompile tunables
Lines like
tunable <name> <value>
will adjust tunables. Right now only three are defined.
--enable-unsafe-tunables is required.
Signed-off-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'src/crush/CrushCompiler.h')
-rw-r--r-- | src/crush/CrushCompiler.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/crush/CrushCompiler.h b/src/crush/CrushCompiler.h index 5476f6b2e81..9d07d76afa9 100644 --- a/src/crush/CrushCompiler.h +++ b/src/crush/CrushCompiler.h @@ -15,6 +15,7 @@ class CrushCompiler { CrushWrapper& crush; ostream& err; int verbose; + bool unsafe_tunables; // decompile enum dcb_state_t { @@ -43,6 +44,7 @@ class CrushCompiler { int int_node(node_t &node); float float_node(node_t &node); + int parse_tunable(iter_t const& i); int parse_device(iter_t const& i); int parse_bucket_type(iter_t const& i); int parse_bucket(iter_t const& i); @@ -55,9 +57,14 @@ class CrushCompiler { public: CrushCompiler(CrushWrapper& c, ostream& eo, int verbosity=0) - : crush(c), err(eo), verbose(verbosity) {} + : crush(c), err(eo), verbose(verbosity), + unsafe_tunables(false) {} ~CrushCompiler() {} + void enable_unsafe_tunables() { + unsafe_tunables = true; + } + int decompile(ostream& out); int compile(istream& in, const char *infn=0); }; |