]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/mds/MDCache.h
import 15.2.5
[ceph.git] / ceph / src / mds / MDCache.h
index bb6759617a5a040fc74023ecede0547a17792780..38fac4235db4dac098f3288933b43928d7be46cb 100644 (file)
@@ -217,6 +217,14 @@ class MDCache {
     stray_index = (stray_index+1)%NUM_STRAY;
   }
 
+  bool get_export_ephemeral_distributed_config(void) const {
+    return export_ephemeral_distributed_config;
+  }
+
+  bool get_export_ephemeral_random_config(void) const {
+    return export_ephemeral_random_config;
+  }
+
   /**
    * Call this when you know that a CDentry is ready to be passed
    * on to StrayManager (i.e. this is a stray you've just created)
@@ -229,6 +237,8 @@ class MDCache {
     stray_manager.eval_stray(dn);
   }
 
+  mds_rank_t hash_into_rank_bucket(inodeno_t ino);
+
   void maybe_eval_stray(CInode *in, bool delay=false);
   void clear_dirty_bits_for_stray(CInode* diri);
 
@@ -901,7 +911,7 @@ class MDCache {
   void discard_delayed_expire(CDir *dir);
 
   // -- mdsmap --
-  void handle_mdsmap(const MDSMap &mdsmap);
+  void handle_mdsmap(const MDSMap &mdsmap, const MDSMap &oldmap);
 
   int dump_cache() { return dump_cache({}, nullptr); }
   int dump_cache(std::string_view filename);
@@ -989,9 +999,13 @@ class MDCache {
   /* Because exports may fail, this set lets us keep track of inodes that need exporting. */
   std::set<CInode *> export_pin_queue;
   std::set<CInode *> export_pin_delayed_queue;
+  std::set<CInode *> rand_ephemeral_pins;
+  std::set<CInode *> dist_ephemeral_pins;
 
   OpenFileTable open_file_table;
 
+  double export_ephemeral_random_max = 0.0;
+
  protected:
   // track master requests whose slaves haven't acknowledged commit
   struct umaster {
@@ -1301,6 +1315,9 @@ class MDCache {
   bool forward_all_requests_to_auth;
   std::array<CInode *, NUM_STRAY> strays{}; // my stray dir
 
+  bool export_ephemeral_distributed_config;
+  bool export_ephemeral_random_config;
+
   // File size recovery
   RecoveryQueue recovery_queue;