From 3b39d525ac739bd4086b7312371b75809d3beac9 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 14 Mar 2008 19:59:44 -0700 Subject: [PATCH] mon: forgot MOSDPGCreate --- src/messages/MOSDPGCreate.h | 48 +++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 src/messages/MOSDPGCreate.h diff --git a/src/messages/MOSDPGCreate.h b/src/messages/MOSDPGCreate.h new file mode 100644 index 0000000000000..01754719f12a4 --- /dev/null +++ b/src/messages/MOSDPGCreate.h @@ -0,0 +1,48 @@ +// -*- 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 + * + * 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 __MOSDPGCREATE_H +#define __MOSDPGCREATE_H + +#include "msg/Message.h" + +/* + * PGCreate - instruct an OSD to create a pg, if it doesn't already exist + */ + +struct MOSDPGCreate : public Message { + version_t epoch; + map mkpg; // pg -> first epoch pg could/might exist + + MOSDPGCreate() {} + MOSDPGCreate(epoch_t e) : + Message(MSG_OSD_PG_CREATE), + epoch(e) { + } + + const char *get_type_name() { return "pg_create"; } + + void encode_payload() { + ::_encode(epoch, payload); + ::_encode(mkpg, payload); + } + void decode_payload() { + int off = 0; + ::_decode(epoch, payload, off); + ::_decode(mkpg, payload, off); + } +}; + +#endif -- 2.39.5