]> git.proxmox.com Git - ceph.git/blob - ceph/src/messages/MExportDirNotifyAck.h
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / messages / MExportDirNotifyAck.h
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) 2004-2006 Sage Weil <sage@newdream.net>
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_MEXPORTDIRNOTIFYACK_H
16 #define CEPH_MEXPORTDIRNOTIFYACK_H
17
18 #include "msg/Message.h"
19
20 class MExportDirNotifyAck : public Message {
21 dirfrag_t dirfrag;
22 pair<__s32,__s32> new_auth;
23
24 public:
25 dirfrag_t get_dirfrag() { return dirfrag; }
26 pair<__s32,__s32> get_new_auth() { return new_auth; }
27
28 MExportDirNotifyAck() {}
29 MExportDirNotifyAck(dirfrag_t df, uint64_t tid, pair<__s32,__s32> na) :
30 Message(MSG_MDS_EXPORTDIRNOTIFYACK), dirfrag(df), new_auth(na) {
31 set_tid(tid);
32 }
33 private:
34 ~MExportDirNotifyAck() override {}
35
36 public:
37 const char *get_type_name() const override { return "ExNotA"; }
38 void print(ostream& o) const override {
39 o << "export_notify_ack(" << dirfrag << ")";
40 }
41
42 void encode_payload(uint64_t features) override {
43 ::encode(dirfrag, payload);
44 ::encode(new_auth, payload);
45 }
46 void decode_payload() override {
47 bufferlist::iterator p = payload.begin();
48 ::decode(dirfrag, p);
49 ::decode(new_auth, p);
50 }
51
52 };
53
54 #endif