From: Kefu Chai Date: Mon, 25 Apr 2016 14:00:47 +0000 (+0800) Subject: Revert "crushtool: do not allow to compile crushmap with repeat ruleset." X-Git-Tag: v11.0.0~835^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F8743%2Fhead;p=ceph.git Revert "crushtool: do not allow to compile crushmap with repeat ruleset." --- diff --git a/src/crush/CrushCompiler.cc b/src/crush/CrushCompiler.cc index 065443dbfcec..22e591348992 100644 --- a/src/crush/CrushCompiler.cc +++ b/src/crush/CrushCompiler.cc @@ -608,10 +608,6 @@ int CrushCompiler::parse_rule(iter_t const& i) } int ruleset = int_node(i->children[start]); - if (ruleset_name.count(ruleset)) { - err << "ruleset '" << ruleset << "' already defined in rule '" << ruleset_name[ruleset] <<"'\n"<< std::endl; - return -1; - } string tname = string_node(i->children[start+2]); int type; @@ -728,7 +724,6 @@ int CrushCompiler::parse_rule(iter_t const& i) } } assert(step == steps); - ruleset_name[ruleset] = rname; return 0; } diff --git a/src/crush/CrushCompiler.h b/src/crush/CrushCompiler.h index 30a9f04c9071..d488735bb9e2 100644 --- a/src/crush/CrushCompiler.h +++ b/src/crush/CrushCompiler.h @@ -39,7 +39,7 @@ class CrushCompiler { map item_weight; map type_id; map rule_id; - map ruleset_name; + string string_node(node_t &node); int int_node(node_t &node); float float_node(node_t &node);