The bucket stanza may specify the canonical id for the bucket as well as
ids for the shadow trees. Make not of all ids so we can avoid colliding
and reusing them later.
Signed-off-by: Sage Weil <sage@redhat.com>
{
for (iter_t p = i->children.begin(); p != i->children.end(); p++) {
if ((int)p->value.id().to_long() == crush_grammar::_bucket) {
- iter_t firstline = p->children.begin() + 3;
- string tag = string_node(firstline->children[0]);
- if (tag == "id") {
+ for (iter_t firstline = p->children.begin() + 3;
+ firstline != p->children.end();
+ ++firstline) {
+ string tag = string_node(firstline->children[0]);
+ if (tag != "id") {
+ break;
+ }
int id = int_node(firstline->children[1]);
//err << "saw bucket id " << id << std::endl;
id_item[id] = string();