summaryrefslogtreecommitdiff
path: root/src/messages
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2012-02-11 11:56:51 -0800
committerSage Weil <sage@newdream.net>2012-02-11 11:57:01 -0800
commita391b0d177dab812daaec8ee1569fb1751e1dcf1 (patch)
tree06323a36164d6268e423b633c8608d7720e83c22 /src/messages
parent6e0e33e72dd81603b6de690da3a39295ef9fd418 (diff)
downloadceph-a391b0d177dab812daaec8ee1569fb1751e1dcf1.tar.gz
osd: fix MOSDPGCreate version setting
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'src/messages')
-rw-r--r--src/messages/MOSDPGCreate.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/messages/MOSDPGCreate.h b/src/messages/MOSDPGCreate.h
index a9b3af74e42..fcfb767807e 100644
--- a/src/messages/MOSDPGCreate.h
+++ b/src/messages/MOSDPGCreate.h
@@ -24,13 +24,17 @@
*/
struct MOSDPGCreate : public Message {
+
+ const static int HEAD_VERSION = 2;
+
version_t epoch;
map<pg_t,pg_create_t> mkpg;
- MOSDPGCreate() : Message(MSG_OSD_PG_CREATE) {}
- MOSDPGCreate(epoch_t e) :
- Message(MSG_OSD_PG_CREATE),
- epoch(e) { }
+ MOSDPGCreate()
+ : Message(MSG_OSD_PG_CREATE, HEAD_VERSION) {}
+ MOSDPGCreate(epoch_t e)
+ : Message(MSG_OSD_PG_CREATE, HEAD_VERSION),
+ epoch(e) { }
private:
~MOSDPGCreate() {}
@@ -38,7 +42,6 @@ public:
const char *get_type_name() const { return "pg_create"; }
void encode_payload(uint64_t features) {
- header.version = 2;
::encode(epoch, payload);
::encode(mkpg, payload);
}
@@ -65,7 +68,7 @@ public:
}
void print(ostream& out) const {
- out << "osd pg create(";
+ out << "osd_pg_create(";
for (map<pg_t,pg_create_t>::const_iterator i = mkpg.begin();
i != mkpg.end();
++i) {