From: Michal Jarzabek Date: Sat, 30 Jul 2016 08:58:30 +0000 (+0100) Subject: mon/Monitor: move C_Scrub, C_ScrubTimeout to .cc X-Git-Tag: v10.2.10~112^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fa33e7600b0205ca9113a1c5be535516886a0701;p=ceph.git mon/Monitor: move C_Scrub, C_ScrubTimeout to .cc Signed-off-by: Michal Jarzabek (cherry picked from commit e58750127cbe8728f4047411904af3890966490f) --- diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index d0cb5d47996..c0098eb3302 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -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); } diff --git a/src/mon/Monitor.h b/src/mon/Monitor.h index cc49a3bca38..50d8467c312 100644 --- a/src/mon/Monitor.h +++ b/src/mon/Monitor.h @@ -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();