]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/messages/MOSDRepOpReply.h
import 15.2.0 Octopus source
[ceph.git] / ceph / src / messages / MOSDRepOpReply.h
index 9ca3a54f587298324dec38e5ba863701f524c440..834dcab35c127fa471892ab8753dc942a8dcff84 100644 (file)
@@ -17,6 +17,7 @@
 #define CEPH_MOSDREPOPREPLY_H
 
 #include "MOSDFastDispatchOp.h"
+#include "MOSDRepOp.h"
 
 /*
  * OSD Client Subop reply
@@ -26,9 +27,7 @@
  *
  */
 
-class MOSDRepOpReply : public MessageInstance<MOSDRepOpReply, MOSDFastDispatchOp> {
-public:
-  friend factory;
+class MOSDRepOpReply : public MOSDFastDispatchOp {
 private:
   static constexpr int HEAD_VERSION = 2;
   static constexpr int COMPAT_VERSION = 1;
@@ -47,7 +46,7 @@ public:
   // piggybacked osd state
   eversion_t last_complete_ondisk;
 
-  bufferlist::const_iterator p;
+  ceph::buffer::list::const_iterator p;
   // Decoding flags. Decoding is only needed for messages caught by pipe reader.
   bool final_decode_needed;
 
@@ -62,6 +61,7 @@ public:
   }
 
   void decode_payload() override {
+    using ceph::decode;
     p = payload.cbegin();
     decode(map_epoch, p);
     if (header.version >= 2) {
@@ -75,6 +75,7 @@ public:
   }
 
   void finish_decode() {
+    using ceph::decode;
     if (!final_decode_needed)
       return; // Message is already final decoded
     decode(ack_type, p);
@@ -117,7 +118,7 @@ public:
   MOSDRepOpReply(
     const MOSDRepOp *req, pg_shard_t from, int result_, epoch_t e, epoch_t mine,
     int at) :
-    MessageInstance(MSG_OSD_REPOPREPLY, HEAD_VERSION, COMPAT_VERSION),
+    MOSDFastDispatchOp{MSG_OSD_REPOPREPLY, HEAD_VERSION, COMPAT_VERSION},
     map_epoch(e),
     min_epoch(mine),
     reqid(req->reqid),
@@ -129,7 +130,7 @@ public:
     set_tid(req->get_tid());
   }
   MOSDRepOpReply() 
-    : MessageInstance(MSG_OSD_REPOPREPLY, HEAD_VERSION, COMPAT_VERSION),
+    : MOSDFastDispatchOp{MSG_OSD_REPOPREPLY, HEAD_VERSION, COMPAT_VERSION},
       map_epoch(0),
       min_epoch(0),
       ack_type(0), result(0),
@@ -140,7 +141,7 @@ private:
 public:
   std::string_view get_type_name() const override { return "osd_repop_reply"; }
 
-  void print(ostream& out) const override {
+  void print(std::ostream& out) const override {
     out << "osd_repop_reply(" << reqid
         << " " << pgid << " e" << map_epoch << "/" << min_epoch;
     if (!final_decode_needed) {
@@ -155,7 +156,9 @@ public:
     out << ")";
   }
 
+private:
+  template<class T, typename... Args>
+  friend boost::intrusive_ptr<T> ceph::make_message(Args&&... args);
 };
 
-
 #endif