]>
git.proxmox.com Git - ceph.git/blob - ceph/src/messages/MMonGetVersion.h
6c5367e13ee42143d27d62b04d24157cc235fab4
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) 2011 New Dream Network
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_MMONGETVERSION_H
16 #define CEPH_MMONGETVERSION_H
18 #include "msg/Message.h"
20 #include "include/types.h"
23 * This message is sent to the monitors to verify that the client's
24 * version of the map(s) is the latest available. For example, this
25 * can be used to determine whether a pool actually does not exist, or
26 * if it may have been created but the map was not received yet.
28 class MMonGetVersion
: public Message
{
30 MMonGetVersion() : Message(CEPH_MSG_MON_GET_VERSION
) {}
32 const char *get_type_name() const override
{
33 return "mon_get_version";
36 void print(ostream
& o
) const override
{
37 o
<< "mon_get_version(what=" << what
<< " handle=" << handle
<< ")";
40 void encode_payload(uint64_t features
) override
{
41 ::encode(handle
, payload
);
42 ::encode(what
, payload
);
45 void decode_payload() override
{
46 bufferlist::iterator p
= payload
.begin();
55 ~MMonGetVersion() override
{}