From d5080799c84208d98e608cb901b816a862f8fbe7 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 28 Jan 2014 11:00:34 -0800 Subject: [PATCH] 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 --- src/mon/OSDMonitor.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index f4143df02a7..3b66a1995f0 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -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 >::iterator p = tmpmap.pg_temp->begin();