]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/Monitor: move C_Scrub, C_ScrubTimeout to .cc 10513/head
authorMichal Jarzabek <stiopa@gmail.com>
Sat, 30 Jul 2016 08:58:30 +0000 (09:58 +0100)
committerMichal Jarzabek <stiopa@gmail.com>
Sun, 7 Aug 2016 16:38:40 +0000 (17:38 +0100)
Signed-off-by: Michal Jarzabek <stiopa@gmail.com>
src/mon/Monitor.cc
src/mon/Monitor.h

index df6a719753f5a11c5128068601f1208416366451..428fe7bcd9e6a8c666a796613b547c8fe3482b86 100644 (file)
@@ -4784,6 +4784,14 @@ void Monitor::scrub_event_start()
     return;
   }
 
+  struct C_Scrub : public Context {
+    Monitor *mon;
+    explicit C_Scrub(Monitor *m) : mon(m) { }
+    void finish(int r) {
+      mon->scrub_start();
+    }
+  };
+
   scrub_event = new C_Scrub(this);
   timer.add_event_after(cct->_conf->mon_scrub_interval, scrub_event);
 }
@@ -4809,6 +4817,15 @@ void Monitor::scrub_reset_timeout()
 {
   dout(15) << __func__ << " reset timeout event" << dendl;
   scrub_cancel_timeout();
+
+  struct C_ScrubTimeout : public Context {
+    Monitor *mon;
+    explicit C_ScrubTimeout(Monitor *m) : mon(m) { }
+    void finish(int r) {
+      mon->scrub_timeout();
+    }
+  };
+
   scrub_timeout_event = new C_ScrubTimeout(this);
   timer.add_event_after(g_conf->mon_scrub_timeout, scrub_timeout_event);
 }
index 1f6be858d0dca9656bed69c5d222162ab6f0e639..7ebce0cfaeb53d8d841d780d437b24c1038be491 100644 (file)
@@ -246,20 +246,6 @@ private:
   void scrub_reset();
   void scrub_update_interval(int secs);
 
-  struct C_Scrub : public Context {
-    Monitor *mon;
-    explicit C_Scrub(Monitor *m) : mon(m) { }
-    void finish(int r) {
-      mon->scrub_start();
-    }
-  };
-  struct C_ScrubTimeout : public Context {
-    Monitor *mon;
-    explicit C_ScrubTimeout(Monitor *m) : mon(m) { }
-    void finish(int r) {
-      mon->scrub_timeout();
-    }
-  };
   Context *scrub_event;       ///< periodic event to trigger scrub (leader)
   Context *scrub_timeout_event;  ///< scrub round timeout (leader)
   void scrub_event_start();