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.
15 #ifndef CEPH_MEXPORTDIRNOTIFYACK_H
16 #define CEPH_MEXPORTDIRNOTIFYACK_H
18 #include "msg/Message.h"
20 class MExportDirNotifyAck : public Message {
22 pair<__s32,__s32> new_auth;
25 dirfrag_t get_dirfrag() { return dirfrag; }
26 pair<__s32,__s32> get_new_auth() { return new_auth; }
28 MExportDirNotifyAck() {}
29 MExportDirNotifyAck(dirfrag_t df, uint64_t tid, pair<__s32,__s32> na) :
30 Message(MSG_MDS_EXPORTDIRNOTIFYACK), dirfrag(df), new_auth(na) {
34 ~MExportDirNotifyAck() override {}
37 const char *get_type_name() const override { return "ExNotA"; }
38 void print(ostream& o) const override {
39 o << "export_notify_ack(" << dirfrag << ")";
42 void encode_payload(uint64_t features) override {
43 ::encode(dirfrag, payload);
44 ::encode(new_auth, payload);
46 void decode_payload() override {
47 bufferlist::iterator p = payload.begin();
49 ::decode(new_auth, p);