From 14687fcc0bb479cc8ab2f7bddcda1d01e568ca1e Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sun, 16 Feb 2020 08:54:32 +0800 Subject: [PATCH] crimson: remove unused include and forward decl and add those used Signed-off-by: Kefu Chai --- src/crimson/admin/admin_socket.cc | 1 - src/crimson/admin/admin_socket.h | 4 ---- src/crimson/admin/osd_admin.cc | 3 --- src/crimson/admin/osd_admin.h | 3 +-- src/crimson/osd/object_context.cc | 5 ++++- src/crimson/osd/object_context.h | 19 ++++++++++++------- src/crimson/osd/ops_executer.h | 1 - src/crimson/osd/osd.h | 3 --- 8 files changed, 17 insertions(+), 22 deletions(-) diff --git a/src/crimson/admin/admin_socket.cc b/src/crimson/admin/admin_socket.cc index 2a85ac9435a8c..1f7fba8c75820 100644 --- a/src/crimson/admin/admin_socket.cc +++ b/src/crimson/admin/admin_socket.cc @@ -3,7 +3,6 @@ #include "crimson/admin/admin_socket.h" -#include #include #include #include diff --git a/src/crimson/admin/admin_socket.h b/src/crimson/admin/admin_socket.h index e7d7eb0f23fce..400b36aada3db 100644 --- a/src/crimson/admin/admin_socket.h +++ b/src/crimson/admin/admin_socket.h @@ -20,12 +20,8 @@ #include "common/cmdparse.h" -class CephContext; - using namespace std::literals; -inline constexpr auto CEPH_ADMIN_SOCK_VERSION = "2"sv; - namespace crimson::admin { class AdminSocket; diff --git a/src/crimson/admin/osd_admin.cc b/src/crimson/admin/osd_admin.cc index 760004180f76b..e271535f2d8e3 100644 --- a/src/crimson/admin/osd_admin.cc +++ b/src/crimson/admin/osd_admin.cc @@ -3,9 +3,6 @@ #include "crimson/admin/osd_admin.h" -#include - -#include #include #include #include diff --git a/src/crimson/admin/osd_admin.h b/src/crimson/admin/osd_admin.h index c40f38f893e65..7c79b796457aa 100644 --- a/src/crimson/admin/osd_admin.h +++ b/src/crimson/admin/osd_admin.h @@ -3,8 +3,7 @@ #pragma once #include - -#include "crimson/common/config_proxy.h" +#include namespace crimson::osd { class OSD; diff --git a/src/crimson/osd/object_context.cc b/src/crimson/osd/object_context.cc index 0c70df5f7fbca..6f20b62a1c4c4 100644 --- a/src/crimson/osd/object_context.cc +++ b/src/crimson/osd/object_context.cc @@ -3,6 +3,9 @@ #include "crimson/osd/object_context.h" +#include "common/Formatter.h" +#include "crimson/common/config_proxy.h" + namespace crimson::osd { void ObjectContext::dump_detail(Formatter *f) const @@ -28,7 +31,7 @@ const char** ObjectContextRegistry::get_tracked_conf_keys() const } void ObjectContextRegistry::handle_conf_change( - const ConfigProxy& conf, + const crimson::common::ConfigProxy& conf, const std::set &changed) { obc_lru.set_target_size(conf.get_val("crimson_osd_obc_lru_size")); diff --git a/src/crimson/osd/object_context.h b/src/crimson/osd/object_context.h index 2d61963e64531..6ff49dedb3f6f 100644 --- a/src/crimson/osd/object_context.h +++ b/src/crimson/osd/object_context.h @@ -3,19 +3,24 @@ #pragma once +#include +#include +#include #include #include -#include -#include -#include -#include - #include "common/intrusive_lru.h" #include "osd/object_state.h" -#include "crimson/common/config_proxy.h" #include "crimson/osd/osd_operation.h" +namespace ceph { + class Formatter; +} + +namespace crimson::common { + class ConfigProxy; +} + namespace crimson::osd { class Watch; @@ -227,7 +232,7 @@ public: } const char** get_tracked_conf_keys() const final; - void handle_conf_change(const ConfigProxy& conf, + void handle_conf_change(const crimson::common::ConfigProxy& conf, const std::set &changed) final; }; diff --git a/src/crimson/osd/ops_executer.h b/src/crimson/osd/ops_executer.h index a66df94a50298..dd7da88ac5039 100644 --- a/src/crimson/osd/ops_executer.h +++ b/src/crimson/osd/ops_executer.h @@ -4,7 +4,6 @@ #pragma once #include -#include #include #include #include diff --git a/src/crimson/osd/osd.h b/src/crimson/osd/osd.h index 94521ce664e81..0630793f44f42 100644 --- a/src/crimson/osd/osd.h +++ b/src/crimson/osd/osd.h @@ -3,9 +3,6 @@ #pragma once -#include -#include -#include #include #include #include -- 2.39.5