#include "common/errno.h"
-class MPoolOpReply : public MessageInstance<MPoolOpReply, PaxosServiceMessage> {
+class MPoolOpReply : public PaxosServiceMessage {
public:
- friend factory;
-
uuid_d fsid;
__u32 replyCode = 0;
epoch_t epoch = 0;
- bufferlist response_data;
+ ceph::buffer::list response_data;
- MPoolOpReply() : MessageInstance(CEPH_MSG_POOLOP_REPLY, 0)
+ MPoolOpReply() : PaxosServiceMessage{CEPH_MSG_POOLOP_REPLY, 0}
{}
MPoolOpReply( uuid_d& f, ceph_tid_t t, int rc, int e, version_t v) :
- MessageInstance(CEPH_MSG_POOLOP_REPLY, v),
+ PaxosServiceMessage{CEPH_MSG_POOLOP_REPLY, v},
fsid(f),
replyCode(rc),
epoch(e) {
set_tid(t);
}
- MPoolOpReply( uuid_d& f, ceph_tid_t t, int rc, int e, version_t v,
- bufferlist *blp) :
- MessageInstance(CEPH_MSG_POOLOP_REPLY, v),
+ MPoolOpReply(uuid_d& f, ceph_tid_t t, int rc, int e, version_t v,
+ ceph::buffer::list *blp) :
+ PaxosServiceMessage{CEPH_MSG_POOLOP_REPLY, v},
fsid(f),
replyCode(rc),
epoch(e) {
std::string_view get_type_name() const override { return "poolopreply"; }
- void print(ostream& out) const override {
+ void print(std::ostream& out) const override {
out << "pool_op_reply(tid " << get_tid()
<< " " << cpp_strerror(-replyCode)
<< " v" << version << ")";
encode(false, payload);
}
void decode_payload() override {
+ using ceph::decode;
auto p = payload.cbegin();
paxos_decode(p);
decode(fsid, p);
decode(response_data, p);
}
}
+private:
+ template<class T, typename... Args>
+ friend boost::intrusive_ptr<T> ceph::make_message(Args&&... args);
};
#endif