From: Alexey Sheplyakov Date: Wed, 17 May 2017 13:50:10 +0000 (+0400) Subject: jewel: mon: add override annotation to callback classes X-Git-Tag: v10.2.10~112^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9693b6bd1685f3ff1a3a44972b7e7f0e03d5da12;p=ceph.git jewel: mon: add override annotation to callback classes The only purpose of this patch is to avoid merge conflicts while cherry-picking commit 561cbded0c7e28231b1c7ce18663b8d7d40aad6d. Alternatively one could cherry-pick 1effdfe19bf9fd6d546620b96eaf452e889b15dc, but that one brings a lot of unrelated changes. Signed-off-by: Alexey Sheplyakov --- diff --git a/src/mon/Elector.cc b/src/mon/Elector.cc index b670929f8cef6..635d6da0a80a0 100644 --- a/src/mon/Elector.cc +++ b/src/mon/Elector.cc @@ -144,7 +144,7 @@ void Elector::reset_timer(double plus) Elector *elector; public: explicit C_ElectionExpire(Elector *e) : elector(e) { } - void finish(int r) { + void finish(int r) override { elector->expire(); } }; diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index c0098eb3302f3..a485b2c53309e 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -4744,7 +4744,7 @@ void Monitor::scrub_event_start() struct C_Scrub : public Context { Monitor *mon; explicit C_Scrub(Monitor *m) : mon(m) { } - void finish(int r) { + void finish(int r) override { mon->scrub_start(); } }; @@ -4778,7 +4778,7 @@ void Monitor::scrub_reset_timeout() struct C_ScrubTimeout : public Context { Monitor *mon; explicit C_ScrubTimeout(Monitor *m) : mon(m) { } - void finish(int r) { + void finish(int r) override { mon->scrub_timeout(); } }; @@ -4793,7 +4793,7 @@ class C_Mon_Tick : public Context { Monitor *mon; public: explicit C_Mon_Tick(Monitor *m) : mon(m) {} - void finish(int r) { + void finish(int r) override { mon->tick(); } }; diff --git a/src/mon/Monitor.h b/src/mon/Monitor.h index 50d8467c31261..d9ba2469a7fb0 100644 --- a/src/mon/Monitor.h +++ b/src/mon/Monitor.h @@ -339,7 +339,7 @@ private: struct C_SyncTimeout : public Context { Monitor *mon; explicit C_SyncTimeout(Monitor *m) : mon(m) {} - void finish(int r) { + void finish(int r) override { mon->sync_timeout(); } }; @@ -506,7 +506,7 @@ private: struct C_TimeCheck : public Context { Monitor *mon; explicit C_TimeCheck(Monitor *m) : mon(m) { } - void finish(int r) { + void finish(int r) override { mon->timecheck_start_round(); } }; @@ -574,7 +574,7 @@ private: struct C_ProbeTimeout : public Context { Monitor *mon; explicit C_ProbeTimeout(Monitor *m) : mon(m) {} - void finish(int r) { + void finish(int r) override { mon->probe_timeout(r); } }; @@ -722,7 +722,7 @@ public: struct C_HealthToClogTick : public Context { Monitor *mon; explicit C_HealthToClogTick(Monitor *m) : mon(m) { } - void finish(int r) { + void finish(int r) override { if (r < 0) return; mon->do_health_to_clog(); @@ -733,7 +733,7 @@ public: struct C_HealthToClogInterval : public Context { Monitor *mon; explicit C_HealthToClogInterval(Monitor *m) : mon(m) { } - void finish(int r) { + void finish(int r) override { if (r < 0) return; mon->do_health_to_clog_interval(); diff --git a/src/mon/Paxos.cc b/src/mon/Paxos.cc index c71689e8c4bf1..aba56d21aab5b 100644 --- a/src/mon/Paxos.cc +++ b/src/mon/Paxos.cc @@ -42,7 +42,7 @@ class Paxos::C_CollectTimeout : public Context { Paxos *paxos; public: explicit C_CollectTimeout(Paxos *p) : paxos(p) {} - void finish(int r) { + void finish(int r) override { if (r == -ECANCELED) return; paxos->collect_timeout(); @@ -53,7 +53,7 @@ class Paxos::C_AcceptTimeout : public Context { Paxos *paxos; public: explicit C_AcceptTimeout(Paxos *p) : paxos(p) {} - void finish(int r) { + void finish(int r) override { if (r == -ECANCELED) return; paxos->accept_timeout(); @@ -64,7 +64,7 @@ class Paxos::C_LeaseAckTimeout : public Context { Paxos *paxos; public: explicit C_LeaseAckTimeout(Paxos *p) : paxos(p) {} - void finish(int r) { + void finish(int r) override { if (r == -ECANCELED) return; paxos->lease_ack_timeout(); @@ -75,7 +75,7 @@ class Paxos::C_LeaseTimeout : public Context { Paxos *paxos; public: explicit C_LeaseTimeout(Paxos *p) : paxos(p) {} - void finish(int r) { + void finish(int r) override { if (r == -ECANCELED) return; paxos->lease_timeout(); @@ -86,7 +86,7 @@ class Paxos::C_LeaseRenew : public Context { Paxos *paxos; public: explicit C_LeaseRenew(Paxos *p) : paxos(p) {} - void finish(int r) { + void finish(int r) override { if (r == -ECANCELED) return; paxos->lease_renew_timeout(); @@ -97,7 +97,7 @@ class Paxos::C_Trimmed : public Context { Paxos *paxos; public: explicit C_Trimmed(Paxos *p) : paxos(p) { } - void finish(int r) { + void finish(int r) override { paxos->trimming = false; } }; diff --git a/src/mon/PaxosService.cc b/src/mon/PaxosService.cc index 078304490f054..0ce05ad765ea0 100644 --- a/src/mon/PaxosService.cc +++ b/src/mon/PaxosService.cc @@ -109,7 +109,7 @@ bool PaxosService::dispatch(MonOpRequestRef op) PaxosService *ps; public: explicit C_Propose(PaxosService *p) : ps(p) { } - void finish(int r) { + void finish(int r) override { ps->proposal_timer = 0; if (r >= 0) ps->propose_pending(); diff --git a/src/mon/QuorumService.h b/src/mon/QuorumService.h index 69d5390587841..f1100520a0d07 100644 --- a/src/mon/QuorumService.h +++ b/src/mon/QuorumService.h @@ -31,7 +31,7 @@ class QuorumService struct C_Tick : public Context { QuorumService *s; C_Tick(QuorumService *qs) : s(qs) { } - void finish(int r) { + void finish(int r) override { if (r < 0) return; s->tick();