]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/mds/MDSRank.h
import ceph pacific 16.2.5
[ceph.git] / ceph / src / mds / MDSRank.h
index 8d0027820f4ce9eac7c439b8b94dd7f465456439..7ec785c14ffccddaed7c1e7a0a974408d0ca6e4b 100644 (file)
@@ -179,7 +179,10 @@ class MDSRank {
 
     mds_rank_t get_nodeid() const { return whoami; }
     std::string_view get_fs_name() const { return fs_name; }
-    int64_t get_metadata_pool();
+    int64_t get_metadata_pool() const
+    {
+        return metadata_pool;
+    }
 
     mono_time get_starttime() const {
       return starttime;
@@ -219,7 +222,7 @@ class MDSRank {
     bool allows_multimds_snaps() const { return mdsmap->allows_multimds_snaps(); }
 
     bool is_cache_trimmable() const {
-      return is_clientreplay() || is_active() || is_stopping();
+      return is_standby_replay() || is_clientreplay() || is_active() || is_stopping();
     }
 
     void handle_write_error(int err);
@@ -601,6 +604,10 @@ class MDSRank {
 private:
     bool send_status = true;
 
+    // The metadata pool won't change in the whole life time of the fs,
+    // with this we can get rid of the mds_lock in many places too.
+    int64_t metadata_pool = -1;
+
     // "task" string that gets displayed in ceph status
     inline static const std::string SCRUB_STATUS_KEY = "scrub status";