]>
git.proxmox.com Git - ceph.git/blob - ceph/src/messages/MOSDFull.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
4 #ifndef CEPH_MOSDFULL_H
5 #define CEPH_MOSDFULL_H
7 #include "messages/PaxosServiceMessage.h"
8 #include "osd/OSDMap.h"
10 // tell the mon to update the full/nearfull bits. note that in the
11 // future this message could be generalized to other state bits, but
12 // for now name it for its sole application.
14 class MOSDFull
: public PaxosServiceMessage
{
16 epoch_t map_epoch
= 0;
23 MOSDFull(epoch_t e
, unsigned s
)
24 : PaxosServiceMessage
{MSG_OSD_FULL
, e
}, map_epoch(e
), state(s
) { }
26 : PaxosServiceMessage
{MSG_OSD_FULL
, 0} {}
29 void encode_payload(uint64_t features
) {
32 encode(map_epoch
, payload
);
33 encode(state
, payload
);
35 void decode_payload() {
36 auto p
= payload
.cbegin();
42 std::string_view
get_type_name() const { return "osd_full"; }
43 void print(ostream
&out
) const {
45 OSDMap::calc_state_set(state
, states
);
46 out
<< "osd_full(e" << map_epoch
<< " " << states
<< " v" << version
<< ")";
49 template<class T
, typename
... Args
>
50 friend boost::intrusive_ptr
<T
> ceph::make_message(Args
&&... args
);