]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: fix up some uninitialized memory
authorSage Weil <sage@newdream.net>
Fri, 16 Oct 2009 22:42:34 +0000 (15:42 -0700)
committerSage Weil <sage@newdream.net>
Fri, 16 Oct 2009 22:42:34 +0000 (15:42 -0700)
src/TODO
src/messages/MMonSubscribeAck.h
src/messages/PaxosServiceMessage.h
src/mon/Monitor.cc

index b3f075a77bf88c20fd4cfa26554a3efcb97d361a..051c7e432b0db6f5c7f822bc9f8048c479fa1aca 100644 (file)
--- a/src/TODO
+++ b/src/TODO
@@ -40,8 +40,7 @@ v0.17
 - msgr: simplified policy, failure model
 - mon: less push, more pull
 - mon: request routing
-
-- mon cluster expansion, contraction
+- mon cluster expansion
 
 - revert 4fe2e6acb9d3613ca041774c1243940d1c8c9c9c
 
@@ -51,7 +50,6 @@ v0.17
 - kill mon->osd
   - how to tell osds to scrub?
 
-- mon: revisit session trim logic... s->until == utime_t()?  :/
 
 pending wire, disk format changes
 
@@ -181,6 +179,7 @@ mds
   - rename: importing inode... also journal imported client map?
 
 mon
+- how to shrink cluster?
 - how to tell osd to cleanly shut down
 - mds injectargs N should take mds# or id.  * should bcast to standy mds's.
 - paxos need to clean up old states.
index 6f45b452d17fd0a2c7215cd9d4c3ba843afe07ca..ecbad41b955cbfcffbed7cadf2fe74aea736170b 100644 (file)
@@ -21,8 +21,13 @@ struct MMonSubscribeAck : public Message {
   __u32 interval;
   ceph_fsid fsid;
   
-  MMonSubscribeAck(int i = 0) : Message(CEPH_MSG_MON_SUBSCRIBE_ACK),
-                               interval(i) {}
+  MMonSubscribeAck() : Message(CEPH_MSG_MON_SUBSCRIBE_ACK),
+                      interval(0) {
+    memset(&fsid, 0, sizeof(fsid));
+  }
+  MMonSubscribeAck(ceph_fsid& f, int i) : Message(CEPH_MSG_MON_SUBSCRIBE_ACK),
+                                         interval(i), fsid(f) { }
+
   
   const char *get_type_name() { return "mon_subscribe_ack"; }
   void print(ostream& o) {
index a42d47091ddc265b132de7d3140931cdd6a4003b..4c1165ada83d9469a244b42f5edcbcbfb005a01f 100644 (file)
@@ -9,8 +9,10 @@ class PaxosServiceMessage : public Message {
   __s16 session_mon;
   __u64 session_mon_tid;
   
-  PaxosServiceMessage() : Message(MSG_PAXOS), version(0), session_mon(-1) { }
-  PaxosServiceMessage(int type, version_t v) : Message(type), version(v), session_mon(-1) { }
+ PaxosServiceMessage() : Message(MSG_PAXOS),
+                        version(0), session_mon(-1), session_mon_tid(0) { }
+  PaxosServiceMessage(int type, version_t v) : Message(type),
+                                              version(v), session_mon(-1), session_mon_tid(0) { }
 
   void paxos_encode() {
     ::encode(version, payload);
index 5f5af3d9835d353588790dad381ef7ab70d4e250..292125cdd1cd076c70e245bcf5360f4541024938 100644 (file)
@@ -623,7 +623,7 @@ void Monitor::handle_subscribe(MMonSubscribe *m)
   // ???
 
   if (reply)
-    messenger->send_message(new MMonSubscribeAck((int)g_conf.mon_subscribe_interval),
+    messenger->send_message(new MMonSubscribeAck(monmap->get_fsid(), (int)g_conf.mon_subscribe_interval),
                            m->get_source_inst());
 
   s->put();