mirror of
https://github.com/ceph/ceph
synced 2025-01-20 18:21:57 +00:00
OSDMonitor: use deepish_copy_from for remove_down_pg_temp
This is a backport of 368852f6c0
.
Make a deep copy of the OSDMap to avoid clobbering the in-memory copy with
the call to apply_incremental.
Fixes: #7060
Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
parent
61914d82bf
commit
d5080799c8
@ -431,7 +431,8 @@ void OSDMonitor::remove_redundant_pg_temp()
|
||||
void OSDMonitor::remove_down_pg_temp()
|
||||
{
|
||||
dout(10) << "remove_down_pg_temp" << dendl;
|
||||
OSDMap tmpmap(osdmap);
|
||||
OSDMap tmpmap;
|
||||
tmpmap.deepish_copy_from(osdmap);
|
||||
tmpmap.apply_incremental(pending_inc);
|
||||
|
||||
for (map<pg_t,vector<int> >::iterator p = tmpmap.pg_temp->begin();
|
||||
|
Loading…
Reference in New Issue
Block a user