From: Sage Weil Date: Tue, 28 Jan 2014 19:00:34 +0000 (-0800) Subject: OSDMonitor: use deepish_copy_from for remove_down_pg_temp X-Git-Tag: v0.67.6~30 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3672fc49bea5efcef2069673c88fd8e526eeb7e5;p=ceph.git OSDMonitor: use deepish_copy_from for remove_down_pg_temp 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 --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index c0b843a12332..c7a252a95d32 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -430,7 +430,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 >::iterator p = tmpmap.pg_temp->begin();