]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
OSDMonitor: use deepish_copy_from for remove_down_pg_temp
authorSage Weil <sage@inktank.com>
Tue, 28 Jan 2014 19:00:34 +0000 (11:00 -0800)
committerSage Weil <sage@inktank.com>
Fri, 31 Jan 2014 15:57:04 +0000 (07:57 -0800)
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>
src/mon/OSDMonitor.cc

index f4143df02a768bef6f9340b54e58baf4185cb986..3b66a1995f02197ad4ff8e684b418fcf4cab4a17 100644 (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();