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