]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: load CompatSet features on startup
authorSage Weil <sage@newdream.net>
Fri, 20 Apr 2012 19:55:35 +0000 (12:55 -0700)
committerSage Weil <sage@newdream.net>
Mon, 23 Apr 2012 21:48:02 +0000 (14:48 -0700)
Signed-off-by: Sage Weil <sage@newdream.net>
src/mon/Monitor.cc
src/mon/Monitor.h

index 0ff20e356d7b93cf1a9dcdcf7582f05272a9ad34..91f65dab3968a83749ebad98f7666dd9b63aed36 100644 (file)
@@ -266,6 +266,19 @@ void Monitor::init()
     cluster_logger = pcb.create_perf_counters();
   }
 
+  // open compatset
+  {
+    bufferlist bl;
+    store->get_bl_ss(bl, COMPAT_SET_LOC, 0);
+    if (bl.length()) {
+      bufferlist::iterator p = bl.begin();
+      ::decode(features, p);
+    } else {
+      features = get_ceph_mon_feature_compat_set();
+    }
+    dout(10) << "features " << features << dendl;
+  }
+
   // init paxos
   for (int i = 0; i < PAXOS_NUM; ++i) {
     paxos[i]->init();
index d16207b46d0c31963221629d40e47b4fcb512ed3..53092bdbed21636f7da5db00f402c9f2b9385eaa 100644 (file)
@@ -115,6 +115,8 @@ public:
 
   AuthSupported auth_supported;
 
+  CompatSet features;
+
 private:
   void new_tick();
   friend class C_Mon_Tick;