]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Revert "crushtool: do not allow to compile crushmap with repeat ruleset." 8743/head
authorKefu Chai <tchaikov@gmail.com>
Mon, 25 Apr 2016 14:00:47 +0000 (22:00 +0800)
committerKefu Chai <tchaikov@gmail.com>
Mon, 25 Apr 2016 14:00:47 +0000 (22:00 +0800)
src/crush/CrushCompiler.cc
src/crush/CrushCompiler.h

index 065443dbfcec6cbb99a1f01956d2b7c05a61008e..22e591348992c12c55ae7207240cba0cff0ace11 100644 (file)
@@ -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;
 }
 
index 30a9f04c907104c1a111b87979ba8828fc93ce77..d488735bb9e23c63207f3b235bc00f06d0d357a3 100644 (file)
@@ -39,7 +39,7 @@ class CrushCompiler {
   map<int, unsigned> item_weight;
   map<string, int> type_id;
   map<string, int> rule_id;
-  map<int, string> ruleset_name;
+
   string string_node(node_t &node);
   int int_node(node_t &node); 
   float float_node(node_t &node);