]>
git.proxmox.com Git - ceph.git/blob - ceph/src/messages/MPGStats.h
dcceff2b3c2083f9b67f0bcac1886899d28d621b
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_MPGSTATS_H
16 #define CEPH_MPGSTATS_H
18 #include "osd/osd_types.h"
19 #include "messages/PaxosServiceMessage.h"
21 class MPGStats
: public PaxosServiceMessage
{
24 map
<pg_t
,pg_stat_t
> pg_stat
;
29 MPGStats() : PaxosServiceMessage(MSG_PGSTATS
, 0) {}
30 MPGStats(const uuid_d
& f
, epoch_t e
, utime_t had
)
31 : PaxosServiceMessage(MSG_PGSTATS
, 0),
38 ~MPGStats() override
{}
41 const char *get_type_name() const override
{ return "pg_stats"; }
42 void print(ostream
& out
) const override
{
43 out
<< "pg_stats(" << pg_stat
.size() << " pgs tid " << get_tid() << " v " << version
<< ")";
46 void encode_payload(uint64_t features
) override
{
48 ::encode(fsid
, payload
);
49 ::encode(osd_stat
, payload
);
50 ::encode(pg_stat
, payload
);
51 ::encode(epoch
, payload
);
52 ::encode(had_map_for
, payload
);
54 void decode_payload() override
{
55 bufferlist::iterator p
= payload
.begin();
58 ::decode(osd_stat
, p
);
61 ::decode(had_map_for
, p
);