]> 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:08:41 +0000 (11:08 -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 c0b843a1233209edf417ac79a7ad5f4a1e38dddd..c7a252a95d326aa2785f9ba4976c4e486c54053f 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();