From 5b974e7c92508379efea9fef7f9ba870651103be Mon Sep 17 00:00:00 2001 From: Yuan Zhou Date: Thu, 20 Dec 2018 21:21:58 +0800 Subject: [PATCH] tools: format headers for object cache daemon Signed-off-by: Yuan Zhou --- .../immutable_object_cache/test_SimplePolicy.cc | 1 + src/tools/immutable_object_cache/CacheClient.cc | 3 --- src/tools/immutable_object_cache/CacheClient.h | 4 ++-- src/tools/immutable_object_cache/CacheController.h | 13 ++----------- src/tools/immutable_object_cache/CacheServer.cc | 3 +-- src/tools/immutable_object_cache/CacheServer.h | 14 +++----------- src/tools/immutable_object_cache/CacheSession.h | 5 ----- src/tools/immutable_object_cache/ObjectCacheFile.h | 1 - .../immutable_object_cache/ObjectCacheStore.cc | 1 - .../immutable_object_cache/ObjectCacheStore.h | 3 --- src/tools/immutable_object_cache/SimplePolicy.cc | 5 +---- src/tools/immutable_object_cache/SimplePolicy.h | 2 -- 12 files changed, 10 insertions(+), 45 deletions(-) diff --git a/src/test/immutable_object_cache/test_SimplePolicy.cc b/src/test/immutable_object_cache/test_SimplePolicy.cc index 808b09b7ad7da..70f333ebec0de 100644 --- a/src/test/immutable_object_cache/test_SimplePolicy.cc +++ b/src/test/immutable_object_cache/test_SimplePolicy.cc @@ -5,6 +5,7 @@ #include #include +#include "include/Context.h" #include "tools/immutable_object_cache/SimplePolicy.h" using namespace ceph::immutable_obj_cache; diff --git a/src/tools/immutable_object_cache/CacheClient.cc b/src/tools/immutable_object_cache/CacheClient.cc index c3070a8f533e8..414c9cbc4cd22 100644 --- a/src/tools/immutable_object_cache/CacheClient.cc +++ b/src/tools/immutable_object_cache/CacheClient.cc @@ -9,9 +9,6 @@ #define dout_prefix *_dout << "ceph::cache::CacheClient: " << this << " " \ << __func__ << ": " - -using boost::asio::local::stream_protocol; - namespace ceph { namespace immutable_obj_cache { diff --git a/src/tools/immutable_object_cache/CacheClient.h b/src/tools/immutable_object_cache/CacheClient.h index dca081cbf5ae2..26162c45f823f 100644 --- a/src/tools/immutable_object_cache/CacheClient.h +++ b/src/tools/immutable_object_cache/CacheClient.h @@ -1,8 +1,8 @@ // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab -#ifndef CEPH_CACHE_CLIENT_H -#define CEPH_CACHE_CLIENT_H +#ifndef CEPH_CACHE_CACHE_CLIENT_H +#define CEPH_CACHE_CACHE_CLIENT_H #include #include diff --git a/src/tools/immutable_object_cache/CacheController.h b/src/tools/immutable_object_cache/CacheController.h index 08fed8b37d17a..427ad5cc80fac 100644 --- a/src/tools/immutable_object_cache/CacheController.h +++ b/src/tools/immutable_object_cache/CacheController.h @@ -1,23 +1,14 @@ // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab -#ifndef CEPH_CACHE_CONTROLLER_H -#define CEPH_CACHE_CONTROLLER_H +#ifndef CEPH_CACHE_CACHE_CONTROLLER_H +#define CEPH_CACHE_CACHE_CONTROLLER_H -#include "common/Formatter.h" -#include "common/admin_socket.h" -#include "common/debug.h" -#include "common/errno.h" #include "common/ceph_context.h" -#include "common/Mutex.h" #include "common/WorkQueue.h" -#include "include/rados/librados.hpp" -#include "include/ceph_assert.h" #include "CacheServer.h" #include "ObjectCacheStore.h" -#include - namespace ceph { namespace immutable_obj_cache { diff --git a/src/tools/immutable_object_cache/CacheServer.cc b/src/tools/immutable_object_cache/CacheServer.cc index 5d94b069c0595..3e0f4c8a34d5d 100644 --- a/src/tools/immutable_object_cache/CacheServer.cc +++ b/src/tools/immutable_object_cache/CacheServer.cc @@ -1,6 +1,7 @@ // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab +#include #include "common/debug.h" #include "common/ceph_context.h" #include "CacheServer.h" @@ -12,8 +13,6 @@ << __func__ << ": " -using boost::asio::local::stream_protocol; - namespace ceph { namespace immutable_obj_cache { diff --git a/src/tools/immutable_object_cache/CacheServer.h b/src/tools/immutable_object_cache/CacheServer.h index 05b31c5b3ce51..a0174451521be 100644 --- a/src/tools/immutable_object_cache/CacheServer.h +++ b/src/tools/immutable_object_cache/CacheServer.h @@ -1,20 +1,12 @@ // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab -#ifndef CEPH_CACHE_SERVER_H -#define CEPH_CACHE_SERVER_H - -#include -#include -#include -#include -#include -#include +#ifndef CEPH_CACHE_CACHE_SERVER_H +#define CEPH_CACHE_CACHE_SERVER_H + #include #include -#include -#include "include/ceph_assert.h" #include "SocketCommon.h" #include "CacheSession.h" diff --git a/src/tools/immutable_object_cache/CacheSession.h b/src/tools/immutable_object_cache/CacheSession.h index 76a8543b34062..989e1181ca29f 100644 --- a/src/tools/immutable_object_cache/CacheSession.h +++ b/src/tools/immutable_object_cache/CacheSession.h @@ -4,17 +4,12 @@ #ifndef CEPH_CACHE_SESSION_H #define CEPH_CACHE_SESSION_H -#include -#include #include #include #include -#include -#include "include/ceph_assert.h" #include "SocketCommon.h" - using boost::asio::local::stream_protocol; using boost::asio::io_service; diff --git a/src/tools/immutable_object_cache/ObjectCacheFile.h b/src/tools/immutable_object_cache/ObjectCacheFile.h index a8fe4350f40f5..7d878390472f4 100644 --- a/src/tools/immutable_object_cache/ObjectCacheFile.h +++ b/src/tools/immutable_object_cache/ObjectCacheFile.h @@ -7,7 +7,6 @@ #include "include/Context.h" #include "include/buffer_fwd.h" #include "common/ceph_context.h" -#include #include diff --git a/src/tools/immutable_object_cache/ObjectCacheStore.cc b/src/tools/immutable_object_cache/ObjectCacheStore.cc index 7894266bdfdc1..6b3dbae79dc69 100644 --- a/src/tools/immutable_object_cache/ObjectCacheStore.cc +++ b/src/tools/immutable_object_cache/ObjectCacheStore.cc @@ -1,7 +1,6 @@ // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab -#include "include/Context.h" #include "ObjectCacheStore.h" #include "Utils.h" #include diff --git a/src/tools/immutable_object_cache/ObjectCacheStore.h b/src/tools/immutable_object_cache/ObjectCacheStore.h index e8c44f0fee80c..d51ce326f3645 100644 --- a/src/tools/immutable_object_cache/ObjectCacheStore.h +++ b/src/tools/immutable_object_cache/ObjectCacheStore.h @@ -4,11 +4,8 @@ #ifndef CEPH_CACHE_OBJECT_CACHE_STORE_H #define CEPH_CACHE_OBJECT_CACHE_STORE_H -#include "common/debug.h" -#include "common/errno.h" #include "common/ceph_context.h" #include "common/Mutex.h" -#include "include/Context.h" #include "include/rados/librados.hpp" #include "ObjectCacheFile.h" diff --git a/src/tools/immutable_object_cache/SimplePolicy.cc b/src/tools/immutable_object_cache/SimplePolicy.cc index 119b8c76b064f..86936b2f3ae6a 100644 --- a/src/tools/immutable_object_cache/SimplePolicy.cc +++ b/src/tools/immutable_object_cache/SimplePolicy.cc @@ -1,12 +1,9 @@ // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab +#include "common/debug.h" #include "SimplePolicy.h" -#include -#include -#include - #define dout_context g_ceph_context #define dout_subsys ceph_subsys_immutable_obj_cache #undef dout_prefix diff --git a/src/tools/immutable_object_cache/SimplePolicy.h b/src/tools/immutable_object_cache/SimplePolicy.h index a75bf3ca3d74d..7dce7840fd322 100644 --- a/src/tools/immutable_object_cache/SimplePolicy.h +++ b/src/tools/immutable_object_cache/SimplePolicy.h @@ -7,11 +7,9 @@ #include "common/ceph_context.h" #include "common/RWLock.h" #include "common/Mutex.h" -#include "common/debug.h" #include "include/lru.h" #include "Policy.h" -#include #include #include -- 2.39.5