]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: use FSMap::insert to add to standby_daemons
authorPatrick Donnelly <pdonnell@redhat.com>
Sat, 16 Jul 2016 03:40:17 +0000 (23:40 -0400)
committerJohn Spray <john.spray@redhat.com>
Thu, 26 Jan 2017 17:26:43 +0000 (17:26 +0000)
This reduces the number of code sites which modify standby_daemons.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 9566ae27b33dd4d266ee9223dc73738922b6eceb)

src/mds/FSMap.cc

index d554cd7811f85c9bf2cdfb51024dc05c49fc2f41..f038b49d098cf86594812d2d3f95814f100b275e 100644 (file)
@@ -430,9 +430,7 @@ void FSMap::decode(bufferlist::iterator& p)
           p.second.rank = p.second.standby_for_rank;
         }
         if (p.second.rank == MDS_RANK_NONE) {
-          standby_daemons[p.first] = p.second;
-          standby_epochs[p.first] = epoch;
-          mds_roles[p.first] = FS_CLUSTER_ID_NONE;
+          insert(p.second); // into standby_daemons
         } else {
           mds_roles[p.first] = migrate_fs->fscid;
         }