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_MMONOBSERVE_H
16
#define CEPH_MMONOBSERVE_H
18
#include "msg/Message.h"
23
class MMonObserve : public PaxosServiceMessage {
29
MMonObserve() : PaxosServiceMessage(MSG_MON_OBSERVE, 0) {}
30
MMonObserve(ceph_fsid_t &f, int mid, version_t v) :
31
PaxosServiceMessage(MSG_MON_OBSERVE, v),
32
fsid(f), machine_id(mid), ver(v) { }
37
const char *get_type_name() { return "mon_observe"; }
38
void print(ostream& o) {
39
o << "observe(" << machine_id << " v" << ver << ")";
42
void encode_payload() {
44
::encode(fsid, payload);
45
::encode(machine_id, payload);
46
::encode(ver, payload);
48
void decode_payload() {
49
bufferlist::iterator p = payload.begin();
52
::decode(machine_id, p);