]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common: Remove redundant includes 15169/head
authorJos Collin <jcollin@redhat.com>
Fri, 19 May 2017 04:17:32 +0000 (09:47 +0530)
committerJos Collin <jcollin@redhat.com>
Mon, 22 May 2017 17:46:26 +0000 (23:16 +0530)
Fixes: http://tracker.ceph.com/issues/19883 (Partially)
Signed-off-by: Jos Collin <jcollin@redhat.com>
26 files changed:
src/common/Mutex.cc
src/common/OutputDataSocket.cc
src/common/OutputDataSocket.h
src/common/PluginRegistry.cc
src/common/PluginRegistry.h
src/common/PrebufferedStreambuf.h
src/common/Preforker.h
src/common/PrioritizedQueue.h
src/common/RefCountedObj.h
src/common/SloppyCRCMap.h
src/common/mutex_debug.cc
src/common/obj_bencher.cc
src/common/obj_bencher.h
src/common/perf_counters.cc
src/common/perf_counters.h
src/common/pick_address.cc
src/common/pipe.c
src/common/run_cmd.cc
src/common/safe_io.c
src/common/safe_io.h
src/common/scrub_types.h
src/common/shared_cache.hpp
src/common/simple_cache.hpp
src/common/solaris_errno.cc
src/common/sstring.hh
src/common/xattr.h

index c70724d2c278b7b80a77f5e411a0e80fcfe7c569..6ac022c8af05111c3acf95966bc4a5fad6d03b0a 100644 (file)
  * Foundation.  See file COPYING.
  *
  */
-#include <string>
 
 #include "common/Mutex.h"
 #include "common/perf_counters.h"
-#include "common/ceph_context.h"
 #include "common/config.h"
-#include "include/stringify.h"
-#include "include/utime.h"
 #include "common/Clock.h"
 #include "common/valgrind.h"
 
index a1c368b40aad51477c9203e4f8537cbc4639e71b..e9c85bd040482c56dbc2d762971193d3f2ea2d95 100644 (file)
  * 
  */
 
-#include "include/int_types.h"
-
-#include "common/Thread.h"
 #include "common/OutputDataSocket.h"
-#include "common/config.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 44490679fbf12860d8cfe8216ca304b696b480c4..0bce1ded790de82f8a2702a72fd362331b632bf5 100644 (file)
 #ifndef CEPH_COMMON_OUTPUTDATASOCKET_H
 #define CEPH_COMMON_OUTPUTDATASOCKET_H
 
-#include "common/Thread.h"
-#include "common/Mutex.h"
 #include "common/Cond.h"
 
-#include <string>
-#include <map>
-#include <list>
-#include "include/buffer.h"
-
 class CephContext;
 
 class OutputDataSocket : public Thread
index 07e73900c38e69342eb42b37c3d2d2b19b26ab2b..cee379dbea773f439e907bf45c9ee5cb66d748b3 100644 (file)
  * 
  */
 
-#include <errno.h>
-#include <dlfcn.h>
-
 #include "PluginRegistry.h"
 #include "ceph_ver.h"
-#include "common/ceph_context.h"
 #include "common/errno.h"
-#include "include/str_list.h"
-
 #include "common/debug.h"
 
+#include <dlfcn.h>
+
 #define PLUGIN_PREFIX "libceph_"
 #define PLUGIN_SUFFIX ".so"
 #define PLUGIN_INIT_FUNCTION "__ceph_plugin_init"
index 1b09570fa0ad0d9e34668bfe51ba6432d99e4b55..c3655bb7df4893f80bc5ea3d6bcb34a051963d9c 100644 (file)
@@ -18,9 +18,6 @@
 #ifndef CEPH_COMMON_PLUGINREGISTRY_H
 #define CEPH_COMMON_PLUGINREGISTRY_H
 
-#include <string>
-#include <map>
-
 #include "common/Mutex.h"
 
 class CephContext;
index d56c9909fe81a735b244cc77b5f02d1d04f5e60d..b7fa21d68b780455b754cad55d79846a07d5a3b1 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef CEPH_COMMON_PREBUFFEREDSTREAMBUF_H
 #define CEPH_COMMON_PREBUFFEREDSTREAMBUF_H
 
-#include <string>
 #include <streambuf>
 
 /**
index d3bbe48363a7503f0e8215e45a59fa8900e24b8c..9fe34e5ea0eb8fb39721cff507d51462475d85b2 100644 (file)
@@ -3,15 +3,10 @@
 #ifndef CEPH_COMMON_PREFORKER_H
 #define CEPH_COMMON_PREFORKER_H
 
-#include "acconfig.h"
-#include <sys/types.h>
 #include <sys/socket.h>
 #include <sys/wait.h>
-#include <errno.h>
-#include <stdlib.h>
 #include <unistd.h>
 #include <sstream>
-#include <string>
 
 #include "include/assert.h"
 #include "common/safe_io.h"
index a1f23f1f86cc69e0baaad368722f30ad421f8304..8d9cd95b28e418d1675729e4e020da48cb53e61c 100644 (file)
@@ -18,9 +18,6 @@
 #include "common/Formatter.h"
 #include "common/OpQueue.h"
 
-#include <map>
-#include <list>
-
 /**
  * Manages queue for normal and strict priority items
  *
index 6099bfff7170299728f0f000e572c183f1a612fa..43d5c171396fee956fac35c648a0de094f95da0b 100644 (file)
  
 #include "common/Mutex.h"
 #include "common/Cond.h"
-#include "include/atomic.h"
-#include "common/ceph_context.h"
 #include "common/valgrind.h"
 
-#include <atomic>
-
 // re-include our assert to clobber the system one; fix dout:
 #include "include/assert.h"
 
index 78c470c1887b24c723c72eeabba917f1984896b8..d8d1561123e1ff04a52d3330fbf777b9b296be6e 100644 (file)
@@ -7,10 +7,6 @@
 #include "include/encoding.h"
 #include "common/Formatter.h"
 
-#include <list>
-#include <map>
-#include <ostream>
-
 /**
  * SloppyCRCMap
  *
index a854358617116fb20878ebf4f9239b7f2b9ea1e1..49cc82b29ab52a137f8d8dfaf5642bc21659fd34 100644 (file)
  * Foundation.  See file COPYING.
  *
  */
-#include <string>
-
-#include <boost/uuid/uuid.hpp>
-#include <boost/uuid/uuid_generators.hpp>
-#include <boost/uuid/uuid_io.hpp>
 
 #include "common/mutex_debug.h"
 #include "common/perf_counters.h"
 #include "common/ceph_context.h"
 #include "common/config.h"
-#include "include/stringify.h"
 
 namespace ceph {
 namespace mutex_debug_detail {
index 32b0abe92352a27d49324d47a2cc0ce4dc5e4536..4eaeba3471f7c5c4bef0b343796f5de0cf34d8b6 100644 (file)
 #include "common/Cond.h"
 #include "obj_bencher.h"
 
-#include <iostream>
-#include <fstream>
-
-#include <cerrno>
-
-#include <stdlib.h>
-#include <time.h>
-#include <sstream>
-#include <vector>
-
 const std::string BENCH_LASTRUN_METADATA = "benchmark_last_metadata";
 const std::string BENCH_PREFIX = "benchmark_data";
 static char cached_hostname[30] = {0};
index 11909e51d0ae1e5d4954357b6ac25f7f3fa9938c..8dad8e6ddf9c53fe9dc3e60b2b10f490aa933887 100644 (file)
@@ -15,8 +15,6 @@
 #ifndef CEPH_OBJ_BENCHER_H
 #define CEPH_OBJ_BENCHER_H
 
-#include "common/config.h"
-#include "common/Cond.h"
 #include "common/ceph_context.h"
 #include "common/Formatter.h"
 #include <cfloat>
index 2cdf7de25c207baabefca4cff0ed7b86ded1d88f..f5969172b81d11d3ad880a5a55940e24a5a4ca47 100644 (file)
  *
  */
 
-#include "include/int_types.h"
-
 #include "common/perf_counters.h"
 #include "common/dout.h"
-#include "common/errno.h"
-#include "common/Formatter.h"
 #include "common/valgrind.h"
 
-#include <errno.h>
-#include <map>
-#include <sstream>
-#include <stdint.h>
-#include <string.h>
-#include <string>
-
 using std::ostringstream;
 
 PerfCountersCollection::PerfCountersCollection(CephContext *cct)
index 95426af5142385b6097e20f898c79248b4b9643a..ea78f10dcaaee4c7f4335ef8f43b406e5d0f2c5a 100644 (file)
 #ifndef CEPH_COMMON_PERF_COUNTERS_H
 #define CEPH_COMMON_PERF_COUNTERS_H
 
-#include "common/config_obs.h"
 #include "common/perf_histogram.h"
-#include "common/Mutex.h"
 #include "include/utime.h"
-
-#include "common/config_obs.h"
 #include "common/Mutex.h"
-#include "common/ceph_time.h"
-
-#include <stdint.h>
-#include <string>
-#include <vector>
-#include <memory>
 
 class CephContext;
 class PerfCountersBuilder;
index 4291cce8cbcd3aae3312367ac77460416e5fef22..e1d3f20a29dea8558e7eafe01fa0d20a7577d8bb 100644 (file)
  */
 
 #include "common/pick_address.h"
-
-#include <netdb.h>
-#include <errno.h>
-#include <ifaddrs.h>
-
 #include "include/ipaddr.h"
 #include "include/str_list.h"
 #include "common/debug.h"
 #include "common/errno.h"
 
+#include <netdb.h>
+
 #define dout_subsys ceph_subsys_
 
 static const struct sockaddr *find_ip_in_subnet_list(CephContext *cct,
index 913aa4fe89ab43960c7b11bdbd2a4afca187662e..7353cb77f79b5a5609942699fca6ff5615638df3 100644 (file)
  * Foundation.  See file COPYING.
  *
  */
-#include "acconfig.h"
-
-#include "common/pipe.h"
 #include "include/compat.h"
 
 #include <errno.h>
 #include <fcntl.h>
-#include <limits.h>
-#include <stdint.h>
 #include <unistd.h>
 
 int pipe_cloexec(int pipefd[2])
index 396676d7b45cd499b6f2be6511380d14bba160f4..a84f68aeaed42ebbfed13b22ebbd2e872f0514a0 100644 (file)
 
 #include "common/errno.h"
 
-#include <errno.h>
 #include <sstream>
 #include <stdarg.h>
-#include <stdlib.h>
 #include <sys/wait.h>
 #include <unistd.h>
 #include <vector>
index e727542fb416b191a2413f2e618b0329d62da5b3..633e3b3e8f06f08ab408fb57622ef8f5fafe7421 100644 (file)
@@ -12,6 +12,9 @@
  *
  */
 
+#include "common/safe_io.h"
+#include "include/compat.h"
+
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
@@ -19,9 +22,6 @@
 #include <fcntl.h>
 #include <limits.h>
 
-#include "common/safe_io.h"
-#include "include/compat.h"
-
 ssize_t safe_read(int fd, void *buf, size_t count)
 {
        size_t cnt = 0;
index 9ba34b6bcd3d6c4b975032b0186fef7dce875b22..af8ca700d418113ea1c3c589c23b97fd3ded6e31 100644 (file)
@@ -15,7 +15,6 @@
 #ifndef CEPH_SAFE_IO
 #define CEPH_SAFE_IO
 
-#include "acconfig.h"
 #include "common/compiler_extensions.h"
 #include <sys/types.h>
 
index 6143e9e17c871a3c38057180b1abf89b5bf85751..39a265671c24d480a4df1f583c81b28b6fd5d9d8 100644 (file)
@@ -4,11 +4,8 @@
 #ifndef CEPH_SCRUB_TYPES_H
 #define CEPH_SCRUB_TYPES_H
 
-#include "include/rados/rados_types.hpp"
-#include "common/hobject.h"
 #include "osd/osd_types.h"
 
-
 // wrappers around scrub types to offer the necessary bits other than
 // the minimal set that the lirados requires
 struct object_id_wrapper : public librados::object_id_t {
index 8ff949084a6ebd7713841a02b69da3088363a24b..6098e57b956f188c5d544717c9a8f43fbde8cf06 100644 (file)
@@ -17,8 +17,6 @@
 
 #include <map>
 #include <list>
-#include <memory>
-#include <utility>
 #include "common/Mutex.h"
 #include "common/Cond.h"
 #include "include/unordered_map.h"
index d8653ece20e59900c6880a0b24950b0603be16e5..1ff4ae911cdc5b48461a53e3c7f4ffc0c7697100 100644 (file)
 #ifndef CEPH_SIMPLECACHE_H
 #define CEPH_SIMPLECACHE_H
 
-#include <map>
-#include <list>
-#include <memory>
 #include "common/Mutex.h"
-#include "common/Cond.h"
 #include "include/unordered_map.h"
 
 template <class K, class V, class C = std::less<K>, class H = std::hash<K> >
index 0ce23c704c81bdd88aae4728c669a070971bca5d..9f899a32ff5bb0da5279928a4f0f50240b18aec2 100644 (file)
@@ -12,7 +12,6 @@
  *
  */
 
-#include <errno.h>
 #include "include/types.h"
 
 
index 8d2c92cc4de9fbb6798d8fdbeaad8a1c59817e9f..6e60b52fe0f6772b06ddca0080c51dccc9e8bfa0 100644 (file)
 #ifndef SSTRING_HH_
 #define SSTRING_HH_
 
-#include <stdint.h>
-#include <algorithm>
-#include <string>
-#include <cstring>
-#include <stdexcept>
-#include <initializer_list>
-#include <iostream>
-#include <functional>
-#include <cstdio>
 #include <type_traits>
 #include <boost/utility/string_ref.hpp>
 
index 147a23c1171a6c48cc463c0cae99b0354d5bd19a..15b356196c900296cb48ead0ce762d02c99acf56 100644 (file)
@@ -12,8 +12,6 @@
 #ifndef CEPH_EXTATTR_H
 #define CEPH_EXTATTR_H
 
-#include <sys/types.h>
-#include <errno.h>
 
 #ifdef __cplusplus
 extern "C" {