1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
4 * Ceph - scalable distributed file system
6 * Copyright (C) 2011 New Dream Network
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.
15 #ifndef CEPH_MDSOPENINOREPLY_H
16 #define CEPH_MDSOPENINOREPLY_H
18 #include "msg/Message.h"
20 struct MMDSOpenInoReply : public Message {
22 vector<inode_backpointer_t> ancestors;
26 MMDSOpenInoReply() : Message(MSG_MDS_OPENINOREPLY), error(0) {}
27 MMDSOpenInoReply(ceph_tid_t t, inodeno_t i, mds_rank_t h=MDS_RANK_NONE, int e=0) :
28 Message(MSG_MDS_OPENINOREPLY), ino(i), hint(h), error(e) {
32 const char *get_type_name() const override { return "openinoreply"; }
33 void print(ostream &out) const override {
34 out << "openinoreply(" << header.tid << " "
35 << ino << " " << hint << " " << ancestors << ")";
38 void encode_payload(uint64_t features) override {
39 ::encode(ino, payload);
40 ::encode(ancestors, payload);
41 ::encode(hint, payload);
42 ::encode(error, payload);
44 void decode_payload() override {
45 bufferlist::iterator p = payload.begin();
47 ::decode(ancestors, p);