1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
3 /*
4 * Ceph - scalable distributed file system
5 *
6 * Copyright (C) 2011 New Dream Network
7 *
8 * This is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License version 2.1, as published by the Free Software
11 * Foundation. See file COPYING.
12 *
13 */
14
15 #ifndef CEPH_MDSOPENINOREPLY_H
16 #define CEPH_MDSOPENINOREPLY_H
17
18 #include "msg/Message.h"
19
20 class MMDSOpenInoReply : public Message {
21 public:
22 static const int HEAD_VERSION = 1;
23 static const int COMPAT_VERSION = 1;
24 inodeno_t ino;
25 vector<inode_backpointer_t> ancestors;
(1) Event member_decl: |
Class member declaration for "hint". |
Also see events: |
[uninit_member] |
26 mds_rank_t hint;
27 int32_t error;
28
29 protected:
(2) Event uninit_member: |
Non-static class member "hint" is not initialized in this constructor nor in any functions that it calls. |
Also see events: |
[member_decl] |
30 MMDSOpenInoReply() : Message{MSG_MDS_OPENINOREPLY, HEAD_VERSION, COMPAT_VERSION}, error(0) {}
31 MMDSOpenInoReply(ceph_tid_t t, inodeno_t i, mds_rank_t h=MDS_RANK_NONE, int e=0) :
32 Message{MSG_MDS_OPENINOREPLY, HEAD_VERSION, COMPAT_VERSION}, ino(i), hint(h), error(e) {
33 header.tid = t;
34 }
35
36
37 public:
38 std::string_view get_type_name() const override { return "openinoreply"; }
39 void print(ostream &out) const override {
40 out << "openinoreply(" << header.tid << " "
41 << ino << " " << hint << " " << ancestors << ")";
42 }
43
44 void encode_payload(uint64_t features) override {
45 using ceph::encode;
46 encode(ino, payload);
47 encode(ancestors, payload);
48 encode(hint, payload);
49 encode(error, payload);
50 }
51 void decode_payload() override {
52 auto p = payload.cbegin();
53 decode(ino, p);
54 decode(ancestors, p);
55 decode(hint, p);
56 decode(error, p);
57 }
58 private:
59 template<class T, typename... Args>
60 friend boost::intrusive_ptr<T> ceph::make_message(Args&&... args);
61 };
62
63 #endif
64