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_MEXPORTDIRFINISH_H
16 #define CEPH_MEXPORTDIRFINISH_H
18 #include "msg/Message.h"
20 class MExportDirFinish : public Message {
25 dirfrag_t get_dirfrag() { return dirfrag; }
26 bool is_last() { return last; }
28 MExportDirFinish() : last(false) {}
29 MExportDirFinish(dirfrag_t df, bool l, uint64_t tid) :
30 Message(MSG_MDS_EXPORTDIRFINISH), dirfrag(df), last(l) {
34 ~MExportDirFinish() override {}
37 const char *get_type_name() const override { return "ExFin"; }
38 void print(ostream& o) const override {
39 o << "export_finish(" << dirfrag << (last ? " last" : "") << ")";
42 void encode_payload(uint64_t features) override {
43 ::encode(dirfrag, payload);
44 ::encode(last, payload);
46 void decode_payload() override {
47 bufferlist::iterator p = payload.begin();