Skip to content

Commit

Permalink
Merge pull request #5527: OSD crash creating/deleting pools
Browse files Browse the repository at this point in the history
Reviewed-by: Loic Dachary <ldachary@redhat.com>
  • Loading branch information
ldachary committed Aug 30, 2015
2 parents 368c6ff + 3396a96 commit 0924bd5
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/osd/OSDMap.cc
Expand Up @@ -1283,13 +1283,6 @@ int OSDMap::apply_incremental(const Incremental &inc)
if (inc.new_pool_max != -1)
pool_max = inc.new_pool_max;

for (set<int64_t>::const_iterator p = inc.old_pools.begin();
p != inc.old_pools.end();
++p) {
pools.erase(*p);
name_pool.erase(pool_name[*p]);
pool_name.erase(*p);
}
for (map<int64_t,pg_pool_t>::const_iterator p = inc.new_pools.begin();
p != inc.new_pools.end();
++p) {
Expand All @@ -1304,6 +1297,13 @@ int OSDMap::apply_incremental(const Incremental &inc)
pool_name[p->first] = p->second;
name_pool[p->second] = p->first;
}
for (set<int64_t>::const_iterator p = inc.old_pools.begin();
p != inc.old_pools.end();
++p) {
pools.erase(*p);
name_pool.erase(pool_name[*p]);
pool_name.erase(*p);
}

for (map<int32_t,uint32_t>::const_iterator i = inc.new_weight.begin();
i != inc.new_weight.end();
Expand Down

0 comments on commit 0924bd5

Please sign in to comment.