]>
git.proxmox.com Git - ceph.git/blob - ceph/src/messages/MOSDScrubReserve.h
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) 2004-2006 Sage Weil <sage@newdream.net>
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_MOSDSCRUBRESERVE_H
16 #define CEPH_MOSDSCRUBRESERVE_H
18 #include "MOSDFastDispatchOp.h"
20 class MOSDScrubReserve
: public MOSDFastDispatchOp
{
22 static constexpr int HEAD_VERSION
= 1;
23 static constexpr int COMPAT_VERSION
= 1;
36 epoch_t
get_map_epoch() const override
{
39 spg_t
get_spg() const override
{
44 : MOSDFastDispatchOp
{MSG_OSD_SCRUB_RESERVE
, HEAD_VERSION
, COMPAT_VERSION
},
45 map_epoch(0), type(-1) {}
46 MOSDScrubReserve(spg_t pgid
,
50 : MOSDFastDispatchOp
{MSG_OSD_SCRUB_RESERVE
, HEAD_VERSION
, COMPAT_VERSION
},
51 pgid(pgid
), map_epoch(map_epoch
),
52 type(type
), from(from
) {}
54 std::string_view
get_type_name() const {
55 return "MOSDScrubReserve";
58 void print(std::ostream
& out
) const {
59 out
<< "MOSDScrubReserve(" << pgid
<< " ";
74 out
<< "e" << map_epoch
<< ")";
78 void decode_payload() {
80 auto p
= payload
.cbegin();
87 void encode_payload(uint64_t features
) {
89 encode(pgid
, payload
);
90 encode(map_epoch
, payload
);
91 encode(type
, payload
);
92 encode(from
, payload
);
95 template<class T
, typename
... Args
>
96 friend boost::intrusive_ptr
<T
> ceph::make_message(Args
&&... args
);