]> git.apps.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>
Tue, 28 Jan 2014 19:10:34 +0000 (11:10 -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 74c16d03242331c0fce8d72eab09e618380faccc..8a6016989b4a467a7014bd7298765d57d68b7f5b 100644 (file)
@@ -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<pg_t,vector<int> >::iterator p = tmpmap.pg_temp->begin();