]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/mds/MDSRank.h
update ceph source to reef 18.2.1
[ceph.git] / ceph / src / mds / MDSRank.h
index c52c837083b98fc9b43cfde2589d6a41a03a19ed..b61fc178c6d0b82ff54069321f94506fe7c4c5df 100644 (file)
@@ -151,29 +151,6 @@ 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
@@ -295,6 +272,13 @@ class MDSRank {
       return count * _heartbeat_reset_grace;
     }
 
+    /**
+     * Abort the MDS and flush any clog messages.
+     *
+     * Callers must already hold mds_lock.
+     */
+    void abort(std::string_view msg);
+
     /**
      * Report state DAMAGED to the mon, and then pass on to respawn().  Call
      * this when an unrecoverable error is encountered while attempting
@@ -322,7 +306,7 @@ class MDSRank {
 
     void send_message_mds(const ref_t<Message>& m, mds_rank_t mds);
     void send_message_mds(const ref_t<Message>& m, const entity_addrvec_t &addr);
-    void forward_message_mds(const cref_t<MClientRequest>& req, mds_rank_t mds);
+    void forward_message_mds(MDRequestRef& mdr, mds_rank_t mds);
     void send_message_client_counted(const ref_t<Message>& m, client_t client);
     void send_message_client_counted(const ref_t<Message>& m, Session* session);
     void send_message_client_counted(const ref_t<Message>& m, const ConnectionRef& connection);
@@ -439,8 +423,6 @@ 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