Skip to content

Commit

Permalink
Merge pull request ceph#8743 from ceph/revert-8502-song20
Browse files Browse the repository at this point in the history
Revert "crushtool: do not allow to compile crushmap with repeat rules…

Reviewed-by: Sage Weil <sage@redhat.com>
  • Loading branch information
tchaikov committed Apr 25, 2016
2 parents ff18083 + edfe301 commit 850e343
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions src/crush/CrushCompiler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -728,7 +724,6 @@ int CrushCompiler::parse_rule(iter_t const& i)
}
}
assert(step == steps);
ruleset_name[ruleset] = rname;
return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion src/crush/CrushCompiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 850e343

Please sign in to comment.