This is a backport of
368852f6c0a884b8fdc80a5cd6f9ab72e814d412.
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>
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();