diff options
author | Kefu Chai <kchai@redhat.com> | 2019-04-14 09:01:57 +0200 |
---|---|---|
committer | Kefu Chai <kchai@redhat.com> | 2019-04-18 00:59:42 +0200 |
commit | 868b47e65a051daa942622b106f08fca2afa9918 (patch) | |
tree | 0dad9a40b8ea2b443a5120ce0cc58fe8fab388fa /src/messages/MExportDir.h | |
parent | msg/Message: remove msgref_cast() (diff) | |
download | ceph-868b47e65a051daa942622b106f08fca2afa9918.tar.xz ceph-868b47e65a051daa942622b106f08fca2afa9918.zip |
src/: use make_message<Foo> instead of Foo::create()
Signed-off-by: Kefu Chai <kchai@redhat.com>
Diffstat (limited to 'src/messages/MExportDir.h')
-rw-r--r-- | src/messages/MExportDir.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/messages/MExportDir.h b/src/messages/MExportDir.h index 8f509e03179..3bd98a33873 100644 --- a/src/messages/MExportDir.h +++ b/src/messages/MExportDir.h @@ -19,18 +19,17 @@ #include "msg/Message.h" -class MExportDir : public MessageInstance<MExportDir> { +class MExportDir : public Message { public: - friend factory; dirfrag_t dirfrag; bufferlist export_data; vector<dirfrag_t> bounds; bufferlist client_map; protected: - MExportDir() : MessageInstance(MSG_MDS_EXPORTDIR) {} + MExportDir() : Message{MSG_MDS_EXPORTDIR} {} MExportDir(dirfrag_t df, uint64_t tid) : - MessageInstance(MSG_MDS_EXPORTDIR), dirfrag(df) { + Message{MSG_MDS_EXPORTDIR}, dirfrag(df) { set_tid(tid); } ~MExportDir() override {} @@ -59,7 +58,9 @@ public: decode(export_data, p); decode(client_map, p); } - +private: + template<class T, typename... Args> + friend boost::intrusive_ptr<T> ceph::make_message(Args&&... args); }; #endif |