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) 2004-2006 Sage Weil <sage@newdream.net>
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.
16 #ifndef CEPH_MINODEFILECAPS_H
17 #define CEPH_MINODEFILECAPS_H
19 class MInodeFileCaps : public Message {
24 inodeno_t get_ino() { return ino; }
25 int get_caps() { return caps; }
27 MInodeFileCaps() : Message(MSG_MDS_INODEFILECAPS) {}
28 MInodeFileCaps(inodeno_t ino, int caps) :
29 Message(MSG_MDS_INODEFILECAPS) {
34 ~MInodeFileCaps() override {}
37 const char *get_type_name() const override { return "inode_file_caps";}
38 void print(ostream& out) const override {
39 out << "inode_file_caps(" << ino << " " << ccap_string(caps) << ")";
42 void encode_payload(uint64_t features) override {
43 ::encode(ino, payload);
44 ::encode(caps, payload);
46 void decode_payload() override {
47 bufferlist::iterator p = payload.begin();