]> git.proxmox.com Git - ceph.git/blame - ceph/src/messages/MGatherCaps.h
Import ceph 15.2.8
[ceph.git] / ceph / src / messages / MGatherCaps.h
CommitLineData
7c673cae
FG
1#ifndef CEPH_MGATHERCAPS_H
2#define CEPH_MGATHERCAPS_H
3
4#include "msg/Message.h"
5
6
9f95a23c
TL
7class MGatherCaps : public Message {
8 static constexpr int HEAD_VERSION = 1;
9 static constexpr int COMPAT_VERSION = 1;
11fdf7f2 10
9f95a23c 11public:
7c673cae
FG
12 inodeno_t ino;
13
11fdf7f2 14protected:
7c673cae 15 MGatherCaps() :
9f95a23c 16 Message{MSG_MDS_GATHERCAPS, HEAD_VERSION, COMPAT_VERSION} {}
7c673cae
FG
17 ~MGatherCaps() override {}
18
19public:
11fdf7f2 20 std::string_view get_type_name() const override { return "gather_caps"; }
7c673cae
FG
21 void print(ostream& o) const override {
22 o << "gather_caps(" << ino << ")";
23 }
24
25 void encode_payload(uint64_t features) override {
11fdf7f2
TL
26 using ceph::encode;
27 encode(ino, payload);
7c673cae
FG
28 }
29 void decode_payload() override {
11fdf7f2
TL
30 using ceph::decode;
31 auto p = payload.cbegin();
32 decode(ino, p);
7c673cae 33 }
9f95a23c
TL
34private:
35 template<class T, typename... Args>
36 friend boost::intrusive_ptr<T> ceph::make_message(Args&&... args);
7c673cae
FG
37};
38
39#endif