]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: don't ignore first full ratio update callback
authorSage Weil <sage@newdream.net>
Fri, 30 Dec 2011 16:06:06 +0000 (08:06 -0800)
committerSage Weil <sage@newdream.net>
Fri, 30 Dec 2011 16:06:06 +0000 (08:06 -0800)
We get a callack on startup.  Don't ignore it.

Signed-off-by: Sage Weil <sage@newdream.net>
src/mon/PGMonitor.cc
src/mon/PGMonitor.h

index 98768bb322f71397ecf30ed2429847859c67a29b..1ad13b88a403c9069f8fd5aa08baaf84f699f2e4 100644 (file)
@@ -69,7 +69,7 @@ public:
 
 PGMonitor::PGMonitor(Monitor *mn, Paxos *p)
   : PaxosService(mn, p),
-    ratio_lock("PGMonitor::ratio_lock"), need_ratio_update(false), first_ratio_update(true)
+    ratio_lock("PGMonitor::ratio_lock"), need_ratio_update(false),
 {
   ratio_monitor = new RatioMonitor(this);
   g_conf->add_observer(ratio_monitor);
index 32851c9368136899a4b2e7efb704828cc9717df7..eb839def1d33759798a8e4a3abb473c3d26baba2 100644 (file)
@@ -44,7 +44,7 @@ public:
   PGMap pg_map;
 
   Mutex ratio_lock;
-  bool need_ratio_update, first_ratio_update;
+  bool need_ratio_update;
   float new_full_ratio, new_nearfull_ratio;
 
 private:
@@ -68,13 +68,6 @@ private:
 
   void update_full_ratios(float full_ratio, int nearfull_ratio) {
     Mutex::Locker l(ratio_lock);
-
-    // ignore callback during startup
-    if (first_ratio_update) {
-      first_ratio_update = false;
-      return;
-    }
-
     if (full_ratio != 0)
       new_full_ratio = full_ratio;
     if (nearfull_ratio != 0)