From 516896d3c93ace4e610960f0f2b7a9824df3f7f2 Mon Sep 17 00:00:00 2001 From: John Spray Date: Fri, 29 Sep 2017 06:43:24 -0400 Subject: [PATCH] mds: fix FSMap copy constructor This was confusing ceph-mgr, which did a fsmap = new_fsmap and found that old filesystems were never disappearing after being removed. Fixes: http://tracker.ceph.com/issues/21599 Signed-off-by: John Spray --- src/mds/FSMap.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mds/FSMap.h b/src/mds/FSMap.h index ea102a712740..a34d278cd316 100644 --- a/src/mds/FSMap.h +++ b/src/mds/FSMap.h @@ -132,6 +132,7 @@ public: standby_daemons(rhs.standby_daemons), standby_epochs(rhs.standby_epochs) { + filesystems.clear(); for (const auto &i : rhs.filesystems) { const auto &fs = i.second; filesystems[fs->fscid] = std::make_shared(*fs); @@ -149,6 +150,7 @@ public: standby_daemons = rhs.standby_daemons; standby_epochs = rhs.standby_epochs; + filesystems.clear(); for (const auto &i : rhs.filesystems) { const auto &fs = i.second; filesystems[fs->fscid] = std::make_shared(*fs); -- 2.47.3