]> git.proxmox.com Git - ceph.git/blame - ceph/src/messages/MMDSResolveAck.h
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / messages / MMDSResolveAck.h
CommitLineData
7c673cae
FG
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_MMDSRESOLVEACK_H
16#define CEPH_MMDSRESOLVEACK_H
17
18#include "msg/Message.h"
19
20#include "include/types.h"
21
22
11fdf7f2
TL
23class MMDSResolveAck : public MessageInstance<MMDSResolveAck> {
24public:
25 friend factory;
26
7c673cae
FG
27 map<metareqid_t, bufferlist> commit;
28 vector<metareqid_t> abort;
29
11fdf7f2
TL
30protected:
31 MMDSResolveAck() : MessageInstance(MSG_MDS_RESOLVEACK) {}
7c673cae
FG
32 ~MMDSResolveAck() override {}
33
34public:
11fdf7f2 35 std::string_view get_type_name() const override { return "resolve_ack"; }
7c673cae
FG
36 /*void print(ostream& out) const {
37 out << "resolve_ack.size()
38 << "+" << ambiguous_imap.size()
39 << " imports +" << slave_requests.size() << " slave requests)";
40 }
41 */
42
43 void add_commit(metareqid_t r) {
44 commit[r].clear();
45 }
46 void add_abort(metareqid_t r) {
47 abort.push_back(r);
48 }
49
50 void encode_payload(uint64_t features) override {
11fdf7f2
TL
51 using ceph::encode;
52 encode(commit, payload);
53 encode(abort, payload);
7c673cae
FG
54 }
55 void decode_payload() override {
11fdf7f2
TL
56 using ceph::decode;
57 auto p = payload.cbegin();
58 decode(commit, p);
59 decode(abort, p);
7c673cae
FG
60 }
61};
62
63#endif