mirror of
https://github.com/ceph/ceph
synced 2025-01-20 01:51:34 +00:00
Merge pull request #5420 from ceph/wip-12429
osd/OSDMap: handle incrementals that modify+del pool Reviewed-by: Greg Farnum <gfarnum@redhat.com> Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
commit
8f0028a9bd
@ -1283,13 +1283,6 @@ int OSDMap::apply_incremental(const Incremental &inc)
|
|||||||
if (inc.new_pool_max != -1)
|
if (inc.new_pool_max != -1)
|
||||||
pool_max = inc.new_pool_max;
|
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();
|
for (map<int64_t,pg_pool_t>::const_iterator p = inc.new_pools.begin();
|
||||||
p != inc.new_pools.end();
|
p != inc.new_pools.end();
|
||||||
++p) {
|
++p) {
|
||||||
@ -1304,6 +1297,13 @@ int OSDMap::apply_incremental(const Incremental &inc)
|
|||||||
pool_name[p->first] = p->second;
|
pool_name[p->first] = p->second;
|
||||||
name_pool[p->second] = p->first;
|
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();
|
for (map<int32_t,uint32_t>::const_iterator i = inc.new_weight.begin();
|
||||||
i != inc.new_weight.end();
|
i != inc.new_weight.end();
|
||||||
|
Loading…
Reference in New Issue
Block a user