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_MMDSTABLEREQUEST_H
17 #define CEPH_MMDSTABLEREQUEST_H
19 #include "msg/Message.h"
20 #include "mds/mds_table_types.h"
22 class MMDSTableRequest : public Message {
29 MMDSTableRequest() : Message(MSG_MDS_TABLE_REQUEST) {}
30 MMDSTableRequest(int tab, int o, uint64_t r, version_t v=0) :
31 Message(MSG_MDS_TABLE_REQUEST),
32 table(tab), op(o), reqid(r) {
36 ~MMDSTableRequest() override {}
39 const char *get_type_name() const override { return "mds_table_request"; }
40 void print(ostream& o) const override {
41 o << "mds_table_request(" << get_mdstable_name(table)
42 << " " << get_mdstableserver_opname(op);
43 if (reqid) o << " " << reqid;
44 if (get_tid()) o << " tid " << get_tid();
45 if (bl.length()) o << " " << bl.length() << " bytes";
49 void decode_payload() override {
50 bufferlist::iterator p = payload.begin();
57 void encode_payload(uint64_t features) override {
58 ::encode(table, payload);
59 ::encode(op, payload);
60 ::encode(reqid, payload);
61 ::encode(bl, payload);