]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common: Remove redundant includes 15267/head
authorJos Collin <jcollin@redhat.com>
Wed, 24 May 2017 13:01:16 +0000 (18:31 +0530)
committerJos Collin <jcollin@redhat.com>
Fri, 26 May 2017 15:42:39 +0000 (21:12 +0530)
Fixes: http://tracker.ceph.com/issues/19883 (Partially)
Signed-off-by: Jos Collin <jcollin@redhat.com>
32 files changed:
src/common/AsyncOpTracker.cc
src/common/AsyncOpTracker.h
src/common/AsyncReserver.h
src/common/BackTrace.cc
src/common/Checksummer.h
src/common/Clock.cc
src/common/address_helper.cc
src/common/admin_socket.cc
src/common/admin_socket.h
src/common/admin_socket_client.cc
src/common/admin_socket_client.h
src/common/assert.cc
src/common/bit_str.cc
src/common/bit_str.h
src/common/bit_vector.hpp
src/common/blkdev.cc
src/common/bloom_filter.cc
src/common/bloom_filter.hpp
src/common/buffer.cc
src/common/ceph_argparse.cc
src/common/ceph_argparse.h
src/common/ceph_context.cc
src/common/ceph_context.h
src/common/ceph_crypto.cc
src/common/ceph_crypto_cms.cc
src/common/ceph_json.cc
src/common/ceph_json.h
src/common/ceph_time.cc
src/common/ceph_time.h
src/common/ceph_timer.h
src/common/cmdparse.cc
src/common/cmdparse.h

index 2219a7fd7f61ee89fa889448eccb5d31acb06eaf..10a72d2b135bb6472d762348e46f87ce2d271752 100644 (file)
@@ -2,7 +2,6 @@
 // vim: ts=8 sw=2 smarttab
 
 #include "common/AsyncOpTracker.h"
-#include "include/assert.h"
 #include "include/Context.h"
 
 AsyncOpTracker::AsyncOpTracker()
index fccc9f91d6bd38a3e1fc2b7bd4aef01427485421..f600cbd7f24387bf8350db59b575e65880ec9b6f 100644 (file)
@@ -4,7 +4,6 @@
 #ifndef CEPH_ASYNC_OP_TRACKER_H
 #define CEPH_ASYNC_OP_TRACKER_H
 
-#include "include/int_types.h"
 #include "common/Mutex.h"
 
 struct Context;
index 467e2570460be837c9f1c300518ba7a47e140ac8..ae22b535d7360ab694bc0ced6187637a85ee6459 100644 (file)
 #ifndef ASYNC_RESERVER_H
 #define ASYNC_RESERVER_H
 
-#include <map>
-#include <utility>
-#include <list>
-
-#include "common/Mutex.h"
 #include "common/Finisher.h"
 #include "common/Formatter.h"
 
index d68f43bd21d7b3279a108a81aab1e20804409079..c179d1dac125264a502ea943d7923cf3156b7a21 100644 (file)
@@ -1,11 +1,8 @@
-
 #include <ostream>
 #include <cxxabi.h>
-#include <stdlib.h>
 #include <string.h>
 
 #include "BackTrace.h"
-
 #include "common/version.h"
 
 #define _STR(x) #x
index 6611e8749f4d3a80b622cd8dafcc6492e265fe78..c303ae2dd98884d1144e7161c6b3ca829321bba2 100644 (file)
@@ -4,7 +4,6 @@
 #ifndef CEPH_OS_BLUESTORE_CHECKSUMMER
 #define CEPH_OS_BLUESTORE_CHECKSUMMER
 
-#include "include/buffer.h"
 #include "xxHash/xxhash.h"
 
 class Checksummer {
index fc8fcb7c919bb7e9d57a37b4b8b1396a1a66227e..b4f07455717ca3fc31594f30ed2cd5b2e067d869 100644 (file)
 
 
 #include "common/Clock.h"
-#include "common/ceph_context.h"
-#include "common/config.h"
-#include "include/utime.h"
-
-#include <time.h>
 
 utime_t ceph_clock_now()
 {
index 9e46b4a99c6ecb0b87699d6b88c85c1fa1a7afbb..8f625f8db4d1fed50f0be9ae0607668aa3636760 100644 (file)
@@ -5,21 +5,12 @@
  *      Author: matt
  */
 
-#include <sys/types.h>
-#include <sys/socket.h>
 #include <netdb.h>
 
-#include <iostream>
-#include <string>
-
-using namespace std;
-
-#include "common/config.h"
-#include "boost/regex.hpp"
-
 #include "common/address_helper.h"
+#include "boost/regex.hpp"
 
-#include <arpa/inet.h>
+using namespace std;
 
 // decode strings like "tcp://<host>:<port>"
 int entity_addr_from_url(entity_addr_t *addr /* out */, const char *url)
index 711d2040b170f9422e078a5f2d5b24f1b9c9d9d0..2744b0f481176aa11d9471373aecec374c0178b5 100644 (file)
  * 
  */
 
-#include "include/int_types.h"
-
-#include "common/Thread.h"
 #include "common/admin_socket.h"
 #include "common/admin_socket_client.h"
-#include "common/config.h"
-#include "common/cmdparse.h"
-#include "common/dout.h"
 #include "common/errno.h"
-#include "common/perf_counters.h"
 #include "common/pipe.h"
 #include "common/safe_io.h"
 #include "common/version.h"
-#include "common/Formatter.h"
+#include "include/compat.h"
 
-#include <errno.h>
-#include <fcntl.h>
-#include <map>
 #include <poll.h>
-#include <set>
-#include <sstream>
-#include <stdint.h>
-#include <string.h>
-#include <string>
-#include <sys/socket.h>
-#include <sys/types.h>
 #include <sys/un.h>
-#include <unistd.h>
-
-#include "include/compat.h"
 
 #define dout_subsys ceph_subsys_asok
 #undef dout_prefix
index 44b8a52be2b34595adaa2f078a7cac793fc2bd9e..e526ba37c919a8bf8282bbc563908063746163df 100644 (file)
 #ifndef CEPH_COMMON_ADMIN_SOCKET_H
 #define CEPH_COMMON_ADMIN_SOCKET_H
 
-#include "common/Thread.h"
-#include "common/Mutex.h"
-
-#include <string>
-#include <map>
-#include "include/buffer_fwd.h"
-#include "common/cmdparse.h"
 #include "common/Cond.h"
 
 class AdminSocket;
index 31346b98ce6dc1b16a557c2140a5f103a66ea523..32eb66479c09432a39023e84278599591855324d 100644 (file)
  *
  */
 
-#include "include/int_types.h"
-
 #include "common/admin_socket.h"
-#include "common/ceph_context.h"
 #include "common/errno.h"
 #include "common/safe_io.h"
 #include "common/admin_socket_client.h"
 
-#include <arpa/inet.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <map>
-#include <poll.h>
-#include <sstream>
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <string>
-#include <sys/socket.h>
-#include <sys/types.h>
 #include <sys/un.h>
-#include <time.h>
-#include <unistd.h>
-#include <vector>
 
 using std::ostringstream;
 
index b46ed24fff13da82a8f84736663beeb96b3e3c2e..dcfab2b8b6ad8b2e559f1cc67797d0998bdcc869 100644 (file)
@@ -15,7 +15,6 @@
 #ifndef CEPH_COMMON_ADMIN_SOCKET_CLIENT_H
 #define CEPH_COMMON_ADMIN_SOCKET_CLIENT_H
 
-#include <stdint.h>
 #include <string>
 
 /* This is a simple client that talks to an AdminSocket using blocking I/O.
index d4dd048c2fa103672664549c0d8c4df1ebe4b40a..7f8bb58140718df5f8fcf996716cea02e813e38c 100644 (file)
  *
  */
 
-#include "BackTrace.h"
-#include "common/ceph_context.h"
-#include "common/config.h"
 #include "common/debug.h"
-#include "common/Clock.h"
-#include "include/assert.h"
-
-#include <errno.h>
-#include <iostream>
-#include <pthread.h>
-#include <sstream>
-#include <time.h>
 
 namespace ceph {
   static CephContext *g_assert_context = NULL;
index b3d1d01483ca62caa8f28ed64c5234e2656c2177..1f9ec3bc46b6c35aa61afe679d6e61666a82ba7f 100644 (file)
@@ -14,7 +14,6 @@
 #include "common/bit_str.h"
 #include "common/Formatter.h"
 #include "include/assert.h"
-#include "common/debug.h"
 
 static void _dump_bit_str(
     uint64_t bits,
index 9f0cb7f6a6abc7262a7313b8d8c68eef1959362c..02c7db951da29cf28768669fb18f2617a276e1ff 100644 (file)
@@ -14,9 +14,7 @@
 #ifndef CEPH_COMMON_BIT_STR_H
 #define CEPH_COMMON_BIT_STR_H
 
-#include <ostream>
 #include <functional>
-#include <stdint.h>
 
 namespace ceph {
   class Formatter;
index c15b0927e376c5614b9c0f54d1b74dae27435e16..6a6e6b7d03e7c86cee913d8578470929a13b4e9a 100644 (file)
 
 #include "common/Formatter.h"
 #include "include/assert.h"
-#include "include/buffer.h"
 #include "include/encoding.h"
-#include <stdint.h>
-#include <cmath>
-#include <list>
-#include <vector>
-#include <boost/static_assert.hpp>
 
 namespace ceph {
 
index 11bd954103b926699ed6d74288f80de9fa20ece5..ae98df96d16114ed72a2c5a07d49dce3bbd6871f 100644 (file)
@@ -9,15 +9,11 @@
  * Foundation.  See file COPYING.
  * 
  */
+
 #include <errno.h>
-#include <sys/types.h>
 #include <sys/ioctl.h>
 #include <sys/stat.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
 #include <dirent.h>
-#include <stdlib.h>
 #include "include/uuid.h"
 
 #ifdef __linux__
index 6bc54bc776202511cbdc63f9ade8825e10354d11..95516e6fdb8978c5c87089f4b7458f8dcba91d94 100644 (file)
@@ -2,8 +2,6 @@
 // vim: ts=8 sw=2 smarttab
 
 #include "common/bloom_filter.hpp"
-#include "common/Formatter.h"
-#include "include/buffer.h"
 
 MEMPOOL_DEFINE_FACTORY(unsigned char, byte, bloom_filter);
 
index 9007f111cd709263b52c5103e3547e1379db97ef..a76109fc6bda273a519553a99a252a4db2fef1b6 100644 (file)
 #ifndef COMMON_BLOOM_FILTER_HPP
 #define COMMON_BLOOM_FILTER_HPP
 
-#include <cstddef>
-#include <algorithm>
 #include <cmath>
-#include <limits>
-#include <list>
-#include <string>
-#include <vector>
 
 #include "include/mempool.h"
 #include "include/encoding.h"
index 5d8dcf5c27d79c07f9c89b3aea5c08c8b694f385..32958bf22e4a486626dffaccc036271c796ab043 100644 (file)
 #include "common/likely.h"
 #include "common/valgrind.h"
 #include "common/deleter.h"
-#include "include/atomic.h"
 #include "common/RWLock.h"
 #include "include/types.h"
-#include "include/inline_memory.h"
 #include "include/scope_guard.h"
+
 #if defined(HAVE_XIO)
 #include "msg/xio/XioMsg.h"
 #endif
 
-#include <errno.h>
-#include <sys/uio.h>
-#include <limits.h>
-
-#include <atomic>
-
 #define CEPH_BUFFER_ALLOC_UNIT  (MIN(CEPH_PAGE_SIZE, 4096))
 #define CEPH_BUFFER_APPEND_SIZE (CEPH_BUFFER_ALLOC_UNIT - sizeof(raw_combined))
 
index 2d73da9dd0407a84a6b10551069e49964dd4039b..355224d0a84f0b975d10a722ed1d036145031207 100644 (file)
  */
 
 #include "auth/Auth.h"
-#include "common/ConfUtils.h"
 #include "common/ceph_argparse.h"
-#include "common/common_init.h"
 #include "common/config.h"
-#include "common/strtol.h"
 #include "common/version.h"
-#include "include/intarith.h"
 #include "include/str_list.h"
-#include "msg/msg_types.h"
-
-#include <errno.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <string>
-#include <string.h>
-#include <sstream>
-#include <vector>
 
 /*
  * Ceph argument parsing library
index 3cf8b7a032ffef7cf838a06ea3b9995f653d1297..9e33d939b17e33efade2642c1dea2ab819e90ea3 100644 (file)
  * stuff to live.
  */
 
-#include <deque>
-#include <stdint.h>
 #include <string>
 #include <vector>
 
 #include "common/entity_name.h"
-#include "msg/msg_types.h"
 
 /////////////////////// Types ///////////////////////
 class CephInitParameters
index e259b28feed44290f5ebe258ba7d8c6cdface7de..81f89e25fa96597bed2fe9908b0557ade71f6af0 100644 (file)
  *
  */
 
-#include <time.h>
-
 #include <boost/algorithm/string.hpp>
 
 #include "include/mempool.h"
 #include "common/admin_socket.h"
 #include "common/perf_counters.h"
-#include "common/Thread.h"
 #include "common/code_environment.h"
-#include "common/ceph_context.h"
 #include "common/ceph_crypto.h"
-#include "common/config.h"
-#include "common/debug.h"
 #include "common/HeartbeatMap.h"
 #include "common/errno.h"
-#include "common/lockdep.h"
-#include "common/Formatter.h"
 #include "common/Graylog.h"
-#include "log/Log.h"
 #include "auth/Crypto.h"
 #include "include/str_list.h"
-#include "common/Mutex.h"
-#include "common/Cond.h"
 #include "common/PluginRegistry.h"
-#include "common/valgrind.h"
-
-#include <iostream>
-#include <pthread.h>
-
-#include "include/Spinlock.h"
 
 using ceph::HeartbeatMap;
 
index 0026b6851dd6057b732f95e43da5e5dc949d44b4..50e6e554166fe88947c7888a56fc93b9433f687e 100644 (file)
 #ifndef CEPH_CEPHCONTEXT_H
 #define CEPH_CEPHCONTEXT_H
 
-#include <iosfwd>
-#include <stdint.h>
-#include <string>
 #include <set>
 
-#include "include/assert.h"
-#include "include/buffer_fwd.h"
 #include "include/atomic.h"
 #include "common/cmdparse.h"
-#include "include/Spinlock.h"
 #include "crush/CrushLocation.h"
 #include <boost/noncopyable.hpp>
 
index 67db503149bbc972a6c4ee7688efd839d6493182..849d5fe704811d165fc4e6a57fc3a2f3b3f2dfa8 100644 (file)
  *
  */
 
-#include "include/int_types.h"
 #include "common/config.h"
-#include "common/ceph_context.h"
 #include "ceph_crypto.h"
-#include "auth/Crypto.h"
-
-#include <pthread.h>
-#include <stdlib.h>
-
 
 #ifdef USE_CRYPTOPP
 void ceph::crypto::init(CephContext *cct)
index 043376b4a9f20ae7fbc87e24885973fa797f5407..109f702bf7399c9eaf1d74480172265f88cbbbeb 100644 (file)
 
 
 #include "common/config.h"
+#include "common/debug.h"
 
 #ifdef USE_NSS
-
 #include <nspr.h>
 #include <cert.h>
 #include <nss.h>
 #include <smime.h>
-
 #endif
 
-#include <string.h>
-#include <errno.h>
-
-
-#include "include/buffer.h"
-
-#include "common/debug.h"
-
-#include "ceph_crypto_cms.h"
-
 #define dout_subsys ceph_subsys_crypto
 
-
 #ifndef USE_NSS
-
 int ceph_decode_cms(CephContext *cct, bufferlist& cms_bl, bufferlist& decoded_bl)
 {
   return -ENOTSUP;
@@ -68,7 +55,6 @@ int ceph_decode_cms(CephContext *cct, bufferlist& cms_bl, bufferlist& decoded_bl
 
 #else
 
-
 static int cms_verbose = 0;
 
 static SECStatus
@@ -356,5 +342,4 @@ int ceph_decode_cms(CephContext *cct, bufferlist& cms_bl, bufferlist& decoded_bl
 
     return ret;
 }
-
 #endif
index 52be8421bb9fda2e81458a96964f288e4922054d..e326fdebcf3267d64ed8524facf1a5eae54b2817 100644 (file)
@@ -1,13 +1,9 @@
-#include <iostream>
-#include <include/types.h>
-#include <limits.h>
-#include <errno.h>
-
 #include "common/ceph_json.h"
 #include "include/utime.h"
 
 // for testing DELETE ME
 #include <fstream>
+#include <include/types.h>
 
 using namespace std;
 using namespace json_spirit;
index 18cf06fd4f198e4e88496fea3ec5f5268964de75..873dcd1afe5cf398423f7295831350a8ae479635 100644 (file)
@@ -1,9 +1,7 @@
 #ifndef CEPH_JSON_H
 #define CEPH_JSON_H
 
-#include <iosfwd>
 #include <include/types.h>
-#include <list>
 
 #ifdef _ASSERT_H
 #define NEED_ASSERT_H
@@ -19,7 +17,6 @@
 
 #include "Formatter.h"
 
-
 using namespace json_spirit;
 
 
index 552b45a4eabcdaf54bc8c1312de76b3bb70ff2f1..be7c5f889c6a3cf3412e62d5408c728f3306b5fc 100644 (file)
@@ -13,7 +13,6 @@
  */
 
 // For ceph_timespec
-#include "include/types.h"
 #include "ceph_time.h"
 #include "config.h"
 
index c4937111bc3d2b2dbbdabe3d95df8427cb4d4986..8479a0d5494c62beb7c9caa88ce4fafd7fd7a22b 100644 (file)
@@ -16,7 +16,6 @@
 #define COMMON_CEPH_TIME_H
 
 #include <chrono>
-#include <ctime>
 
 #include "include/encoding.h"
 
index 6323be66ab442b33980091ca88300a3ad362d266..4b7438672d409bc78c2fd99c49758276eab54c28 100644 (file)
 #define COMMON_CEPH_TIMER_H
 
 #include <condition_variable>
-#include <functional>
-#include <mutex>
 #include <thread>
-
 #include <boost/intrusive/set.hpp>
 
-#include "ceph_time.h"
-
 namespace ceph {
 
   /// Newly constructed timer should be suspended at point of
index bf1a327b031b5ffaa3bfbff658a5ccd0429ec51f..c396b8ada48ed671deabe6173898c70486607385 100644 (file)
  *
  */
 
-#include <cxxabi.h>
-#include "common/cmdparse.h"
-#include "common/Formatter.h"
-#include "include/str_list.h"
 #include "json_spirit/json_spirit.h"
 #include "common/debug.h"
 
index 788b7097d46207e0e29011b85b12bf488fa68b84..236b1f51a0ffc99ad41e4610143ce7e807f4eda9 100644 (file)
@@ -3,12 +3,8 @@
 #ifndef CEPH_COMMON_CMDPARSE_H
 #define CEPH_COMMON_CMDPARSE_H
 
-#include <string>
-#include <sstream>
-#include <map>
 #include <boost/variant.hpp>
-#include <vector>
-#include <stdexcept>
+
 #include "common/Formatter.h"
 #include "common/BackTrace.h"