]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/mds/MDSRank.h
update ceph source to reef 18.2.0
[ceph.git] / ceph / src / mds / MDSRank.h
index 7e147c94c96e04c57231b1672bf695f8ce1803c7..c52c837083b98fc9b43cfde2589d6a41a03a19ed 100644 (file)
@@ -151,6 +151,29 @@ class Finisher;
 class ScrubStack;
 class C_ExecAndReply;
 
+struct MDSMetaRequest {
+private:
+  int _op;
+  CDentry *_dentry;
+  ceph_tid_t _tid;
+public:
+  explicit MDSMetaRequest(int op, CDentry *dn, ceph_tid_t tid) :
+    _op(op), _dentry(dn), _tid(tid) {
+    if (_dentry) {
+      _dentry->get(CDentry::PIN_PURGING);
+    }
+  }
+  ~MDSMetaRequest() {
+    if (_dentry) {
+      _dentry->put(CDentry::PIN_PURGING);
+    }
+  }
+
+  CDentry *get_dentry() { return _dentry; }
+  int get_op() { return _op; }
+  ceph_tid_t get_tid() { return _tid; }
+};
+
 /**
  * The public part of this class's interface is what's exposed to all
  * the various subsystems (server, mdcache, etc), such as pointers
@@ -416,6 +439,8 @@ class MDSRank {
     PerfCounters *logger = nullptr, *mlogger = nullptr;
     OpTracker op_tracker;
 
+    std::map<ceph_tid_t, MDSMetaRequest> internal_client_requests;
+
     // The last different state I held before current
     MDSMap::DaemonState last_state = MDSMap::STATE_BOOT;
     // The state assigned to me by the MDSMap