#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;
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 {}
encode(dirfrag, payload);
encode(success, payload);
}
+private:
+ template<class T, typename... Args>
+ friend boost::intrusive_ptr<T> ceph::make_message(Args&&... args);
};
#endif