]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: harden rank lookup
authorPatrick Donnelly <pdonnell@redhat.com>
Thu, 9 Sep 2021 21:56:04 +0000 (17:56 -0400)
committerPatrick Donnelly <pdonnell@redhat.com>
Fri, 17 Sep 2021 01:51:12 +0000 (21:51 -0400)
This is a trivial refactor.

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

src/mds/FSMap.cc

index 7fa5ca9904b5e3d09ffe864e58f7478fb0daea45..9508e8df2c9ea4934da906ca422c661781c90a96 100644 (file)
@@ -1011,7 +1011,7 @@ void FSMap::damaged(mds_gid_t who, epoch_t blocklist_epoch)
 {
   ceph_assert(mds_roles.at(who) != FS_CLUSTER_ID_NONE);
   auto fs = filesystems.at(mds_roles.at(who));
-  mds_rank_t rank = fs->mds_map.mds_info[who].rank;
+  mds_rank_t rank = fs->mds_map.mds_info.at(who).rank;
 
   erase(who, blocklist_epoch);
   fs->mds_map.failed.erase(rank);