]>
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
{
21 static const int HEAD_VERSION
= 1;
22 static const int COMPAT_VERSION
= 1;
35 epoch_t
get_map_epoch() const override
{
38 spg_t
get_spg() const override
{
43 : MOSDFastDispatchOp(MSG_OSD_SCRUB_RESERVE
, HEAD_VERSION
, COMPAT_VERSION
),
44 map_epoch(0), type(-1) {}
45 MOSDScrubReserve(spg_t pgid
,
49 : MOSDFastDispatchOp(MSG_OSD_SCRUB_RESERVE
, HEAD_VERSION
, COMPAT_VERSION
),
50 pgid(pgid
), map_epoch(map_epoch
),
51 type(type
), from(from
) {}
53 const char *get_type_name() const {
54 return "MOSDScrubReserve";
57 void print(ostream
& out
) const {
58 out
<< "MOSDScrubReserve(" << pgid
<< " ";
73 out
<< "e" << map_epoch
<< ")";
77 void decode_payload() {
78 bufferlist::iterator p
= payload
.begin();
80 ::decode(map_epoch
, p
);
85 void encode_payload(uint64_t features
) {
86 ::encode(pgid
, payload
);
87 ::encode(map_epoch
, payload
);
88 ::encode(type
, payload
);
89 ::encode(from
, payload
);