mirror of
https://github.com/ceph/ceph
synced 2025-03-11 02:39:05 +00:00
Merge branch 'master' of ssh://ceph.newdream.net/home/sage/ceph.newdream.net/git/ceph
This commit is contained in:
commit
f7add28b23
@ -1,50 +0,0 @@
|
||||
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
|
||||
// vim: ts=8 sw=2 smarttab
|
||||
/*
|
||||
* Ceph - scalable distributed file system
|
||||
*
|
||||
* Copyright (C) 2004-2006 Sage Weil <sage@newdream.net>
|
||||
*
|
||||
* This is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License version 2.1, as published by the Free Software
|
||||
* Foundation. See file COPYING.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __MMONOSDMAPINFO_H
|
||||
#define __MMONOSDMAPINFO_H
|
||||
|
||||
#include "msg/Message.h"
|
||||
|
||||
#include "include/types.h"
|
||||
|
||||
class MMonOSDMapInfo : public Message {
|
||||
public:
|
||||
epoch_t epoch;
|
||||
epoch_t mon_epoch;
|
||||
|
||||
epoch_t get_epoch() { return epoch; }
|
||||
epoch_t get_mon_epoch() { return mon_epoch; }
|
||||
|
||||
MMonOSDMapInfo(epoch_t e, epoch_t me) :
|
||||
Message(MSG_MON_OSDMAP_UPDATE_PREPARE),
|
||||
epoch(e), mon_epoch(me) {
|
||||
}
|
||||
|
||||
char *get_type_name() { return "omap_info"; }
|
||||
|
||||
void encode_payload() {
|
||||
payload.append((char*)&epoch, sizeof(epoch));
|
||||
payload.append((char*)&mon_epoch, sizeof(mon_epoch));
|
||||
}
|
||||
void decode_payload() {
|
||||
int off = 0;
|
||||
payload.copy(off, sizeof(epoch), (char*)&epoch);
|
||||
off += sizeof(epoch);
|
||||
payload.copy(off, sizeof(mon_epoch), (char*)&mon_epoch);
|
||||
off += sizeof(mon_epoch);
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
@ -1,50 +0,0 @@
|
||||
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
|
||||
// vim: ts=8 sw=2 smarttab
|
||||
/*
|
||||
* Ceph - scalable distributed file system
|
||||
*
|
||||
* Copyright (C) 2004-2006 Sage Weil <sage@newdream.net>
|
||||
*
|
||||
* This is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License version 2.1, as published by the Free Software
|
||||
* Foundation. See file COPYING.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __MMONOSDMAPLEASE_H
|
||||
#define __MMONOSDMAPLEASE_H
|
||||
|
||||
#include "msg/Message.h"
|
||||
|
||||
#include "include/types.h"
|
||||
|
||||
class MMonOSDMapLease : public Message {
|
||||
epoch_t epoch;
|
||||
utime_t lease_expire;
|
||||
|
||||
public:
|
||||
epoch_t get_epoch() { return epoch; }
|
||||
const utime_t& get_lease_expire() { return lease_expire; }
|
||||
|
||||
MMonOSDMapLease(epoch_t e, utime_t le) :
|
||||
Message(MSG_MON_OSDMAP_LEASE),
|
||||
epoch(e), lease_expire(le) {
|
||||
}
|
||||
|
||||
char *get_type_name() { return "omap_lease"; }
|
||||
|
||||
void encode_payload() {
|
||||
payload.append((char*)&epoch, sizeof(epoch));
|
||||
payload.append((char*)&lease_expire, sizeof(lease_expire));
|
||||
}
|
||||
void decode_payload() {
|
||||
int off = 0;
|
||||
payload.copy(off, sizeof(epoch), (char*)&epoch);
|
||||
off += sizeof(epoch);
|
||||
payload.copy(off, sizeof(lease_expire), (char*)&lease_expire);
|
||||
off += sizeof(lease_expire);
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
@ -1,45 +0,0 @@
|
||||
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
|
||||
// vim: ts=8 sw=2 smarttab
|
||||
/*
|
||||
* Ceph - scalable distributed file system
|
||||
*
|
||||
* Copyright (C) 2004-2006 Sage Weil <sage@newdream.net>
|
||||
*
|
||||
* This is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License version 2.1, as published by the Free Software
|
||||
* Foundation. See file COPYING.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __MMONOSDMAPLEASEACK_H
|
||||
#define __MMONOSDMAPLEASEACK_H
|
||||
|
||||
#include "msg/Message.h"
|
||||
|
||||
#include "include/types.h"
|
||||
|
||||
class MMonOSDMapLeaseAck : public Message {
|
||||
epoch_t epoch;
|
||||
|
||||
public:
|
||||
epoch_t get_epoch() { return epoch; }
|
||||
|
||||
MMonOSDMapLeaseAck(epoch_t e) :
|
||||
Message(MSG_MON_OSDMAP_LEASE_ACK),
|
||||
epoch(e) {
|
||||
}
|
||||
|
||||
char *get_type_name() { return "omap_lease_ack"; }
|
||||
|
||||
void encode_payload() {
|
||||
payload.append((char*)&epoch, sizeof(epoch));
|
||||
}
|
||||
void decode_payload() {
|
||||
int off = 0;
|
||||
payload.copy(off, sizeof(epoch), (char*)&epoch);
|
||||
off += sizeof(epoch);
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
@ -1,43 +0,0 @@
|
||||
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
|
||||
// vim: ts=8 sw=2 smarttab
|
||||
/*
|
||||
* Ceph - scalable distributed file system
|
||||
*
|
||||
* Copyright (C) 2004-2006 Sage Weil <sage@newdream.net>
|
||||
*
|
||||
* This is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License version 2.1, as published by the Free Software
|
||||
* Foundation. See file COPYING.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __MMONOSDMAPUPDATEACK_H
|
||||
#define __MMONOSDMAPUPDATEACK_H
|
||||
|
||||
#include "msg/Message.h"
|
||||
|
||||
#include "include/types.h"
|
||||
|
||||
class MMonOSDMapUpdateAck : public Message {
|
||||
public:
|
||||
epoch_t epoch;
|
||||
|
||||
MMonOSDMapUpdateAck(epoch_t e) :
|
||||
Message(MSG_MON_OSDMAP_UPDATE_ACK),
|
||||
epoch(e) {
|
||||
}
|
||||
|
||||
char *get_type_name() { return "omap_update_ack"; }
|
||||
|
||||
void encode_payload() {
|
||||
payload.append((char*)&epoch, sizeof(epoch));
|
||||
}
|
||||
void decode_payload() {
|
||||
int off = 0;
|
||||
payload.copy(off, sizeof(epoch), (char*)&epoch);
|
||||
off += sizeof(epoch);
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
@ -1,43 +0,0 @@
|
||||
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
|
||||
// vim: ts=8 sw=2 smarttab
|
||||
/*
|
||||
* Ceph - scalable distributed file system
|
||||
*
|
||||
* Copyright (C) 2004-2006 Sage Weil <sage@newdream.net>
|
||||
*
|
||||
* This is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License version 2.1, as published by the Free Software
|
||||
* Foundation. See file COPYING.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __MMONOSDMAPUPDATECOMMIT_H
|
||||
#define __MMONOSDMAPUPDATECOMMIT_H
|
||||
|
||||
#include "msg/Message.h"
|
||||
|
||||
#include "include/types.h"
|
||||
|
||||
class MMonOSDMapUpdateCommit : public Message {
|
||||
public:
|
||||
epoch_t epoch;
|
||||
|
||||
MMonOSDMapUpdateCommit(epoch_t e) :
|
||||
Message(MSG_MON_OSDMAP_UPDATE_COMMIT),
|
||||
epoch(e) {
|
||||
}
|
||||
|
||||
char *get_type_name() { return "omap_update_commit"; }
|
||||
|
||||
void encode_payload() {
|
||||
payload.append((char*)&epoch, sizeof(epoch));
|
||||
}
|
||||
void decode_payload() {
|
||||
int off = 0;
|
||||
payload.copy(off, sizeof(epoch), (char*)&epoch);
|
||||
off += sizeof(epoch);
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
@ -1,53 +0,0 @@
|
||||
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
|
||||
// vim: ts=8 sw=2 smarttab
|
||||
/*
|
||||
* Ceph - scalable distributed file system
|
||||
*
|
||||
* Copyright (C) 2004-2006 Sage Weil <sage@newdream.net>
|
||||
*
|
||||
* This is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License version 2.1, as published by the Free Software
|
||||
* Foundation. See file COPYING.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __MMONOSDMAPUPDATEPREPARE_H
|
||||
#define __MMONOSDMAPUPDATEPREPARE_H
|
||||
|
||||
#include "msg/Message.h"
|
||||
|
||||
#include "include/types.h"
|
||||
|
||||
class MMonOSDMapUpdatePrepare : public Message {
|
||||
public:
|
||||
epoch_t epoch;
|
||||
bufferlist map_bl;
|
||||
bufferlist inc_map_bl;
|
||||
|
||||
epoch_t get_epoch() { return epoch; }
|
||||
|
||||
MMonOSDMapUpdatePrepare(epoch_t e,
|
||||
bufferlist& mbl, bufferlist& incmbl) :
|
||||
Message(MSG_MON_OSDMAP_UPDATE_PREPARE),
|
||||
epoch(e),
|
||||
map_bl(mbl), inc_map_bl(incmbl) {
|
||||
}
|
||||
|
||||
char *get_type_name() { return "omap_update_prepare"; }
|
||||
|
||||
void encode_payload() {
|
||||
payload.append((char*)&epoch, sizeof(epoch));
|
||||
::_encode(map_bl, payload);
|
||||
::_encode(inc_map_bl, payload);
|
||||
}
|
||||
void decode_payload() {
|
||||
int off = 0;
|
||||
payload.copy(off, sizeof(epoch), (char*)&epoch);
|
||||
off += sizeof(epoch);
|
||||
::_decode(map_bl, payload, off);
|
||||
::_decode(inc_map_bl, payload, off);
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user