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:
Sage Weil 2014-01-28 11:00:34 -08:00
parent 61914d82bf
commit d5080799c8

View File

@ -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();