#define CEPH_MOSDREPOPREPLY_H
#include "MOSDFastDispatchOp.h"
+#include "MOSDRepOp.h"
/*
* OSD Client Subop reply
*
*/
-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;
// 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;
}
void decode_payload() override {
+ using ceph::decode;
p = payload.cbegin();
decode(map_epoch, p);
if (header.version >= 2) {
}
void finish_decode() {
+ using ceph::decode;
if (!final_decode_needed)
return; // Message is already final decoded
decode(ack_type, p);
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),
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),
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) {
out << ")";
}
+private:
+ template<class T, typename... Args>
+ friend boost::intrusive_ptr<T> ceph::make_message(Args&&... args);
};
-
#endif