From e95bb632adb50f19c4c574d4caf9c86cfa066612 Mon Sep 17 00:00:00 2001 From: Yao Zongyou Date: Thu, 31 Jan 2019 10:41:25 +0800 Subject: [PATCH 1/2] mon: remove futile class forward declaration Signed-off-by: Yao Zongyou --- src/mon/AuthMonitor.h | 2 -- src/mon/ConfigKeyService.h | 3 --- src/mon/HealthMonitor.h | 3 --- src/mon/LogMonitor.h | 1 - src/mon/MDSMonitor.h | 3 --- src/mon/MonClient.h | 1 - src/mon/Monitor.h | 12 ------------ src/mon/MonmapMonitor.h | 4 ---- 8 files changed, 29 deletions(-) diff --git a/src/mon/AuthMonitor.h b/src/mon/AuthMonitor.h index 89c548cf079a0..082b4b979ced9 100644 --- a/src/mon/AuthMonitor.h +++ b/src/mon/AuthMonitor.h @@ -24,9 +24,7 @@ #include "mon/PaxosService.h" #include "mon/MonitorDBStore.h" -class MMonCommand; struct MAuth; -struct MMonGlobalID; class KeyRing; class Monitor; diff --git a/src/mon/ConfigKeyService.h b/src/mon/ConfigKeyService.h index 23826397ebce2..c0073e504869d 100644 --- a/src/mon/ConfigKeyService.h +++ b/src/mon/ConfigKeyService.h @@ -19,9 +19,6 @@ class Paxos; class Monitor; -namespace ceph { -class Formatter; -} class ConfigKeyService : public QuorumService { diff --git a/src/mon/HealthMonitor.h b/src/mon/HealthMonitor.h index 50a1699de658f..05f3bba977a90 100644 --- a/src/mon/HealthMonitor.h +++ b/src/mon/HealthMonitor.h @@ -16,9 +16,6 @@ #include "mon/PaxosService.h" -//forward declaration -namespace ceph { class Formatter; } - class HealthMonitor : public PaxosService { version_t version = 0; diff --git a/src/mon/LogMonitor.h b/src/mon/LogMonitor.h index 964058418aa9f..215ef485e5a77 100644 --- a/src/mon/LogMonitor.h +++ b/src/mon/LogMonitor.h @@ -25,7 +25,6 @@ #include "common/LogEntry.h" #include "include/str_map.h" -class MMonCommand; class MLog; static const string LOG_META_CHANNEL = "$channel"; diff --git a/src/mon/MDSMonitor.h b/src/mon/MDSMonitor.h index 2f82e8afb0ac4..fa918e443f9d4 100644 --- a/src/mon/MDSMonitor.h +++ b/src/mon/MDSMonitor.h @@ -27,9 +27,6 @@ #include "msg/Messenger.h" #include "messages/MMDSBeacon.h" -class MMonCommand; -class MMDSLoadTargets; -class MMDSMap; class FileSystemCommandHandler; class MDSMonitor : public PaxosService, public PaxosFSMap { diff --git a/src/mon/MonClient.h b/src/mon/MonClient.h index 6ac86687d09b2..afe2f3a82e015 100644 --- a/src/mon/MonClient.h +++ b/src/mon/MonClient.h @@ -31,7 +31,6 @@ class MMonGetVersionReply; struct MMonSubscribeAck; class MMonCommandAck; struct MAuthReply; -class MAuthRotating; class LogClient; class AuthAuthorizer; class AuthMethodList; diff --git a/src/mon/Monitor.h b/src/mon/Monitor.h index 4528b651b4404..b97659f02fb54 100644 --- a/src/mon/Monitor.h +++ b/src/mon/Monitor.h @@ -100,18 +100,6 @@ class PaxosService; class PerfCounters; class AdminSocketHook; -class MMonGetMap; -class MMonGetVersion; -class MMonMetadata; -class MMonSync; -class MMonScrub; -class MMonProbe; -struct MMonSubscribe; -struct MRoute; -struct MForward; -struct MTimeCheck2; -struct MMonHealth; - #define COMPAT_SET_LOC "feature_set" class C_MonContext final : public FunctionContext { diff --git a/src/mon/MonmapMonitor.h b/src/mon/MonmapMonitor.h index 6268194afb563..c9e1f89097a7d 100644 --- a/src/mon/MonmapMonitor.h +++ b/src/mon/MonmapMonitor.h @@ -29,10 +29,6 @@ #include "MonMap.h" #include "MonitorDBStore.h" -class MMonMap; -class MMonCommand; -class MMonJoin; - class MonmapMonitor : public PaxosService { public: MonmapMonitor(Monitor *mn, Paxos *p, const string& service_name) From d51871495c77bf3ed3cee546e644d8b1c6035d6a Mon Sep 17 00:00:00 2001 From: Yao Zongyou Date: Thu, 31 Jan 2019 10:47:46 +0800 Subject: [PATCH 2/2] mon: remove redundant friend class C_Updated declaration Signed-off-by: Yao Zongyou --- src/mon/MgrMonitor.h | 2 -- src/mon/MgrStatMonitor.h | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/mon/MgrMonitor.h b/src/mon/MgrMonitor.h index d8cfc0e5dd0c9..73063677dcbd8 100644 --- a/src/mon/MgrMonitor.h +++ b/src/mon/MgrMonitor.h @@ -125,8 +125,6 @@ class MgrMonitor: public PaxosService void count_metadata(const string& field, Formatter *f); void count_metadata(const string& field, std::map *out); - friend class C_Updated; - // When did the mon last call into our tick() method? Used for detecting // when the mon was not updating us for some period (e.g. during slow // election) to reset last_beacon timeouts diff --git a/src/mon/MgrStatMonitor.h b/src/mon/MgrStatMonitor.h index ee77bf3fc2edf..683a180b8eded 100644 --- a/src/mon/MgrStatMonitor.h +++ b/src/mon/MgrStatMonitor.h @@ -98,6 +98,4 @@ class MgrStatMonitor : public PaxosService { bool verbose) const { digest.dump_pool_stats_full(osdm, ss, f, verbose); } - - friend class C_Updated; };