]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/Monitor: move C_Scrub, C_ScrubTimeout to .cc
authorMichal Jarzabek <stiopa@gmail.com>
Sat, 30 Jul 2016 08:58:30 +0000 (09:58 +0100)
committerAlexey Sheplyakov <asheplyakov@mirantis.com>
Wed, 17 May 2017 13:43:04 +0000 (17:43 +0400)
Signed-off-by: Michal Jarzabek <stiopa@gmail.com>
(cherry picked from commit e58750127cbe8728f4047411904af3890966490f)

src/mon/Monitor.cc
src/mon/Monitor.h

index d0cb5d4799663dfb70251485e8fa830d07f4f91c..c0098eb3302f3563af08dcb203be3b8312c5b045 100644 (file)
@@ -4741,6 +4741,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);
 }
@@ -4766,6 +4774,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 cc49a3bca38731407c3b1ed99088bb75a33f6988..50d8467c312619ea15fc4d3e5af91da86c27e12a 100644 (file)
@@ -259,20 +259,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();