]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/FSCommands: fix variable names and function names in calls
authorRishabh Dave <ridave@redhat.com>
Wed, 6 Sep 2023 22:16:39 +0000 (03:46 +0530)
committerRishabh Dave <ridave@redhat.com>
Thu, 7 Sep 2023 06:09:11 +0000 (11:39 +0530)
PR #51942 today and PR #52409 was merged last week. Latter PR changed
"fs" to "fsp" and made mds_map and fscid private and introduced
get_mds_map() and get_fsicd() methods instead.

Combination of former and latter PR introduced compilation errors & made
it impossible to build the binaries on the latest main branch. This
commit attemps to fix this issue.

Fixes: https://tracker.ceph.com/issues/62729
Signed-off-by: Rishabh Dave <ridave@redhat.com>
src/mon/FSCommands.cc

index 31dc76cba6242708a085b3e9c7f68e5a197575ff..de8695fb783c8bb67de0ae9adf3583cee59d4e87 100644 (file)
@@ -731,24 +731,24 @@ public:
       }
 
       if (refuse_standby_for_another_fs) {
-        if (!(fs->mds_map.test_flag(CEPH_MDSMAP_REFUSE_STANDBY_FOR_ANOTHER_FS))) {
+        if (!(fsp->get_mds_map().test_flag(CEPH_MDSMAP_REFUSE_STANDBY_FOR_ANOTHER_FS))) {
           fsmap.modify_filesystem(
-            fs->fscid,
-            [](std::shared_ptr<Filesystem> fs)
+            fsp->get_fscid(),
+            [](auto&& fs)
           {
-            fs->mds_map.set_flag(CEPH_MDSMAP_REFUSE_STANDBY_FOR_ANOTHER_FS);
+            fs.get_mds_map().set_flag(CEPH_MDSMAP_REFUSE_STANDBY_FOR_ANOTHER_FS);
           });
           ss << "set to refuse standby for another fs";
         } else {
           ss << "to refuse standby for another fs is already set";
         }
       } else {
-          if (fs->mds_map.test_flag(CEPH_MDSMAP_REFUSE_STANDBY_FOR_ANOTHER_FS)) {
+          if (fsp->get_mds_map().test_flag(CEPH_MDSMAP_REFUSE_STANDBY_FOR_ANOTHER_FS)) {
             fsmap.modify_filesystem(
-              fs->fscid,
-              [](std::shared_ptr<Filesystem> fs)
+              fsp->get_fscid(),
+              [](auto&& fs)
             {
-              fs->mds_map.clear_flag(CEPH_MDSMAP_REFUSE_STANDBY_FOR_ANOTHER_FS);
+              fs.get_mds_map().clear_flag(CEPH_MDSMAP_REFUSE_STANDBY_FOR_ANOTHER_FS);
             });
             ss << "allowed to use standby for another fs";
           } else {