]>
git.proxmox.com Git - ceph.git/blob - ceph/src/messages/MOSDPGNotify2.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
6 #include "messages/MOSDPeeringOp.h"
7 #include "osd/PGPeeringEvent.h"
9 class MOSDPGNotify2
: public MOSDPeeringOp
{
11 static constexpr int HEAD_VERSION
= 1;
12 static constexpr int COMPAT_VERSION
= 1;
18 spg_t
get_spg() const override
{
21 epoch_t
get_map_epoch() const override
{
22 return notify
.epoch_sent
;
24 epoch_t
get_min_epoch() const override
{
25 return notify
.query_epoch
;
28 PGPeeringEvent
*get_event() override
{
29 return new PGPeeringEvent(
34 pg_shard_t(get_source().num(), notify
.from
),
36 get_connection()->get_features()),
42 notify
.past_intervals
,
46 MOSDPGNotify2() : MOSDPeeringOp
{MSG_OSD_PG_NOTIFY2
,
47 HEAD_VERSION
, COMPAT_VERSION
} {
48 set_priority(CEPH_MSG_PRIO_HIGH
);
53 : MOSDPeeringOp
{MSG_OSD_PG_NOTIFY2
, HEAD_VERSION
, COMPAT_VERSION
},
56 set_priority(CEPH_MSG_PRIO_HIGH
);
60 ~MOSDPGNotify2() override
{}
63 std::string_view
get_type_name() const override
{
66 void inner_print(std::ostream
& out
) const override
{
67 out
<< spgid
<< " " << notify
;
70 void encode_payload(uint64_t features
) override
{
72 encode(spgid
, payload
);
73 encode(notify
, payload
);
75 void decode_payload() override
{
77 auto p
= payload
.cbegin();
82 template<class T
, typename
... Args
>
83 friend boost::intrusive_ptr
<T
> ceph::make_message(Args
&&... args
);