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) 2009 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_MMDSLoadTargets_H
16 #define CEPH_MMDSLoadTargets_H
18 #include "msg/Message.h"
19 #include "mds/mdstypes.h"
20 #include "messages/PaxosServiceMessage.h"
21 #include "include/types.h"
26 class MMDSLoadTargets : public PaxosServiceMessage {
29 set<mds_rank_t> targets;
31 MMDSLoadTargets() : PaxosServiceMessage(MSG_MDS_OFFLOAD_TARGETS, 0) {}
33 MMDSLoadTargets(mds_gid_t g, set<mds_rank_t>& mds_targets) :
34 PaxosServiceMessage(MSG_MDS_OFFLOAD_TARGETS, 0),
35 global_id(g), targets(mds_targets) {}
37 ~MMDSLoadTargets() override {}
40 const char* get_type_name() const override { return "mds_load_targets"; }
41 void print(ostream& o) const override {
42 o << "mds_load_targets(" << global_id << " " << targets << ")";
45 void decode_payload() override {
46 bufferlist::iterator p = payload.begin();
48 ::decode(global_id, p);
52 void encode_payload(uint64_t features) override {
54 ::encode(global_id, payload);
55 ::encode(targets, payload);