From 9e357ed58f86ea46c841fc6978b6811803fde654 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 74c16d0324233..8a6016989b4a4 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(); -- 2.39.5