]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/messages/MExportDirPrepAck.h
import 15.2.0 Octopus source
[ceph.git] / ceph / src / messages / MExportDirPrepAck.h
index 11e59a8d6a8a8d0a1ed7544d89adbcc11d1df6c6..1792185e95b319cb7d4c152565173d1092eabd54 100644 (file)
 #include "msg/Message.h"
 #include "include/types.h"
 
-class MExportDirPrepAck : public MessageInstance<MExportDirPrepAck> {
-public:
-  friend factory;
+class MExportDirPrepAck : public SafeMessage {
 private:
+  static const int HEAD_VERSION = 1;
+  static const int COMPAT_VERSION = 1;
+
   dirfrag_t dirfrag;
   bool success = false;
 
@@ -29,9 +30,10 @@ private:
   dirfrag_t get_dirfrag() const { return dirfrag; }
 
 protected:
-  MExportDirPrepAck() {}
+  MExportDirPrepAck() :
+    SafeMessage{MSG_MDS_EXPORTDIRPREPACK, HEAD_VERSION, COMPAT_VERSION} {}
   MExportDirPrepAck(dirfrag_t df, bool s, uint64_t tid) :
-    MessageInstance(MSG_MDS_EXPORTDIRPREPACK), dirfrag(df), success(s) {
+    SafeMessage{MSG_MDS_EXPORTDIRPREPACK, HEAD_VERSION, COMPAT_VERSION}, dirfrag(df), success(s) {
     set_tid(tid);
   }
   ~MExportDirPrepAck() override {}
@@ -54,6 +56,9 @@ public:
     encode(dirfrag, payload);
     encode(success, payload);
   }
+private:
+  template<class T, typename... Args>
+  friend boost::intrusive_ptr<T> ceph::make_message(Args&&... args);
 };
 
 #endif