]> git.proxmox.com Git - ceph.git/blob - ceph/src/messages/MOSDPGRecoveryDeleteReply.h
update sources to v12.1.2
[ceph.git] / ceph / src / messages / MOSDPGRecoveryDeleteReply.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
3
4 #ifndef MOSDRECOVERYDELETEREPLY_H
5 #define MOSDRECOVERYDELETEREPLY_H
6
7 #include "MOSDFastDispatchOp.h"
8
9 struct MOSDPGRecoveryDeleteReply : public MOSDFastDispatchOp {
10 static const int HEAD_VERSION = 1;
11 static const int COMPAT_VERSION = 1;
12
13 pg_shard_t from;
14 spg_t pgid;
15 epoch_t map_epoch, min_epoch;
16 list<pair<hobject_t, eversion_t> > objects;
17
18 epoch_t get_map_epoch() const override {
19 return map_epoch;
20 }
21 epoch_t get_min_epoch() const override {
22 return min_epoch;
23 }
24 spg_t get_spg() const override {
25 return pgid;
26 }
27
28 MOSDPGRecoveryDeleteReply()
29 : MOSDFastDispatchOp(MSG_OSD_PG_RECOVERY_DELETE_REPLY, HEAD_VERSION, COMPAT_VERSION),
30 map_epoch(0), min_epoch(0)
31 {}
32
33 void decode_payload() override {
34 bufferlist::iterator p = payload.begin();
35 ::decode(pgid.pgid, p);
36 ::decode(map_epoch, p);
37 ::decode(min_epoch, p);
38 ::decode(objects, p);
39 ::decode(pgid.shard, p);
40 ::decode(from, p);
41 }
42
43 void encode_payload(uint64_t features) override {
44 ::encode(pgid.pgid, payload);
45 ::encode(map_epoch, payload);
46 ::encode(min_epoch, payload);
47 ::encode(objects, payload);
48 ::encode(pgid.shard, payload);
49 ::encode(from, payload);
50 }
51
52 void print(ostream& out) const override {
53 out << "MOSDPGRecoveryDeleteReply(" << pgid
54 << " e" << map_epoch << "," << min_epoch << " " << objects << ")";
55 }
56
57 const char *get_type_name() const override { return "recovery_delete_reply"; }
58 };
59
60 #endif