]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common: Remove redundant includes
authorJos Collin <jcollin@redhat.com>
Wed, 24 May 2017 01:04:50 +0000 (06:34 +0530)
committerJos Collin <jcollin@redhat.com>
Wed, 24 May 2017 01:23:40 +0000 (06:53 +0530)
Fixes: http://tracker.ceph.com/issues/19883 (Partially)
Signed-off-by: Jos Collin <jcollin@redhat.com>
19 files changed:
src/common/Cond.h
src/common/ConfUtils.cc
src/common/ContextCompletion.h
src/common/Cycles.cc
src/common/DecayCounter.h
src/common/code_environment.cc
src/common/cohort_lru.h
src/common/common_init.cc
src/common/common_init.h
src/common/config.cc
src/common/config.h
src/common/config_validators.cc
src/common/deleter.h
src/common/dns_resolve.cc
src/common/dns_resolve.h
src/common/dout.h
src/common/entity_name.cc
src/common/entity_name.h
src/common/errno.cc

index 14022768303ad5050e8ffb7eeff82d6605d33116..aa53b60f2349e16ff488b9fcf6f827d564412041 100644 (file)
 #ifndef CEPH_COND_H
 #define CEPH_COND_H
 
-#include <time.h>
-#include <pthread.h>
-
 #include "include/Context.h"
 
-#include "common/ceph_time.h"
-#include "common/Mutex.h"
-#include "common/Clock.h"
-
-
 class Cond {
   // my bits
   pthread_cond_t _c;
index 135e7da17abf07a5256fab695073137b396ddd5b..db957760bf9a704ca4c6b4b634089966374f8fd3 100644 (file)
  */
 
 #include <algorithm>
-#include <errno.h>
 #include <map>
 #include <sstream>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <string>
 #include <sys/stat.h>
 #include <iostream>
 
@@ -28,7 +23,6 @@
 #include "common/utf8.h"
 #include "common/ConfUtils.h"
 
-using std::cerr;
 using std::ostringstream;
 using std::pair;
 using std::string;
index a8b5b689f00f03adc1454fa222955e31d858d9f6..37d82337eb811fba29185c1a577f951598f402ec 100644 (file)
@@ -3,7 +3,6 @@
 #ifndef CEPH_ASYNC_COMPLETION_H
 #define CEPH_ASYNC_COMPLETION_H
 
-#include "include/int_types.h"
 #include "include/Context.h"
 
 namespace ceph {
index 656f08b40ceeab8a7a51225bee8e63ef833ce6f8..b1888d34cffc1179940de8a98d33e511876acdae 100644 (file)
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-
-#include <errno.h>
-#include <sys/time.h>
-
-#include "errno.h"
 #include "debug.h"
-#include "Initialize.h"
 #include "Cycles.h"
 
 double Cycles::cycles_per_sec = 0;
index 6a3ac4bcad431da8a533bde6b278648db57ee474..e45aed8d2f2a5f590859898a2928e7e188fdba7f 100644 (file)
@@ -17,8 +17,6 @@
 
 #include "include/utime.h"
 
-#include <math.h>
-
 /**
  *
  * TODO: normalize value based on some fucntion of half_life, 
index 662fa36c9bdf0937179c8a9e71e8b6c83eebb61c..32fea3aee697f74b084bda8c8e81e4ad7f175826 100644 (file)
  * Foundation.  See file COPYING.
  *
  */
-#include "acconfig.h"
 
 #include "common/code_environment.h"
 
-#include <errno.h>
 #include <iostream>
-#include <stdlib.h>
-#include <string.h>
-#include <string>
 
 #ifdef HAVE_SYS_PRCTL_H
 #include <sys/prctl.h>
index 8a8b766997261d17f07128923cb1c658ec789981..13c760f76f2e69814b75b7c274e3ede3fd9c44d1 100644 (file)
 #ifndef COHORT_LRU_H
 #define COHORT_LRU_H
 
-#include <stdint.h>
-#include <atomic>
 #include <boost/intrusive/list.hpp>
-#include <boost/intrusive/rbtree.hpp>
-#include <boost/intrusive/avltree.hpp>
-#include <mutex>
-#include <atomic>
-#include <vector>
-#include <algorithm>
-#include <iostream>
+
 #include "common/likely.h"
 
 #ifndef CACHE_LINE_SIZE
index d796e933c4b95e92e041580e3521410219b21cf8..a62f67e2ee7fe59e7d24cbf8c2a9c74cce471e46 100644 (file)
 
 #include "common/admin_socket.h"
 #include "common/ceph_argparse.h"
-#include "common/ceph_context.h"
-#include "common/ceph_crypto.h"
-#include "common/code_environment.h"
 #include "common/common_init.h"
-#include "common/config.h"
-#include "common/dout.h"
-#include "common/errno.h"
-#include "common/safe_io.h"
 #include "common/valgrind.h"
-#include "common/version.h"
-#include "common/strtol.h"
 #include "common/zipkin_trace.h"
-#include "include/color.h"
-
-#include <errno.h>
-#include <deque>
 
 #define dout_subsys ceph_subsys_
 
index 6ef4a90f56af74b274ac903f7b7d76128b5afe92..4c3c200bfb1df5bcb35b18b37fc6007aedd97b96 100644 (file)
@@ -16,9 +16,6 @@
 #define CEPH_COMMON_INIT_H
 
 #include <deque>
-#include <stdint.h>
-#include <string>
-#include <vector>
 
 #include "common/code_environment.h"
 
index 32a817deb8c9b380b5630aa02fba6a72161ddb8d..8c026f89a9ffdcdd789dc39a88953b15ed5233c2 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/config_validators.h"
-#include "common/static_assert.h"
-#include "common/strtol.h"
-#include "common/version.h"
 #include "include/str_list.h"
-#include "include/types.h"
 #include "include/stringify.h"
-#include "msg/msg_types.h"
 #include "osd/osd_types.h"
 #include "common/errno.h"
 #include "common/hostname.h"
 
-#include "include/assert.h"
-
-#include <errno.h>
-#include <sstream>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-
-#include <type_traits>
-#include <utility>
 #include <boost/type_traits.hpp>
-#include <boost/utility/enable_if.hpp>
 
 /* Don't use standard Ceph logging in this file.
  * We can't use logging until it's initialized, and a lot of the necessary
 
 using std::map;
 using std::list;
-using std::multimap;
 using std::ostringstream;
 using std::pair;
-using std::set;
 using std::string;
 
 const char *CEPH_CONF_FILE_DEFAULT = "$data_dir/config, /etc/ceph/$cluster.conf, ~/.ceph/$cluster.conf, $cluster.conf"
index 887b2f7e9398b0304ea771cfd760366f3dae308b..4c970d24c72944ecb3f840591ad8e165c4bdb6a8 100644 (file)
 #ifndef CEPH_CONFIG_H
 #define CEPH_CONFIG_H
 
-#include <iosfwd>
-#include <functional>
-#include <vector>
-#include <map>
-#include <set>
-#include <boost/variant.hpp>
-
 #include "common/ConfUtils.h"
 #include "common/entity_name.h"
 #include "common/Mutex.h"
 #include "log/SubsystemMap.h"
 #include "common/config_obs.h"
-#include "msg/msg_types.h"
 
 enum {
   CEPH_DEFAULT_CRUSH_REPLICATED_RULESET,
index 0f224f94b8dbf285a043691c130077e1fc408c9e..5a3392919aee48ac75463bebef7f04c62cfe86d6 100644 (file)
@@ -3,10 +3,7 @@
 
 #include "common/config_validators.h"
 #include "include/stringify.h"
-#include "include/rbd/features.h"
-#include <map>
-#include <sstream>
-#include <vector>
+
 #include <boost/algorithm/string.hpp>
 #include <boost/lexical_cast.hpp>
 
index a13cf1f92dd2e92f4b5395eacfe457742f2a14be..767ef4b1c573433c2653a5ea6d7b1f9b6cd59fca 100644 (file)
 #define CEPH_COMMON_DELETER_H
 
 #include <atomic>
-#include <memory>
-#include <cstdlib>
-#include <type_traits>
-
-#include "include/assert.h"
 
 /// \addtogroup memory-module
 /// @{
index 77f5b52949752d69a07e94437511d53ec88324bf..3227c88e2fd2f6297abd32ccb7a75e2a5fc4f2a6 100644 (file)
  *
  */
 
-#include <sys/types.h>
-#include <netinet/in.h>
-#include <arpa/nameser.h>
 #include <arpa/inet.h>
-#include <resolv.h>
 
 #include "dns_resolve.h"
-
-#include "acconfig.h"
 #include "common/debug.h"
-#include "msg/msg_types.h"
-
 
 #define dout_subsys ceph_subsys_
 
index dbcc79a7b5c91a38efac5af805bb743b96d68768..bf05c27b751d739ef2c11d9cb42692eca009b650 100644 (file)
 #ifndef CEPH_DNS_RESOLVE_H
 #define CEPH_DNS_RESOLVE_H
 
-#include <string>
-#include <sys/types.h>
-#include <netinet/in.h>
 #include <resolv.h>
 
 #include "common/Mutex.h"
-#include "common/ceph_context.h"
 
 struct entity_addr_t;
 
index d2340c9364ccc0c35a1d2df1579b3b6694fc4c88..8aa976b8cd1586eedbb18e65a9c60df960c8514d 100644 (file)
 #include "common/likely.h"
 #include "common/Clock.h"
 #include "log/Log.h"
-#include "include/assert.h"
-
-#include <iostream>
-#include <pthread.h>
-#include <streambuf>
-#include <sstream>
 
 extern void dout_emergency(const char * const str);
 extern void dout_emergency(const std::string &str);
index becad3a1209231c78a29e6c540053955c16a261d..533c1e979129e0f37928a3060b5deffa4ac7192b 100644 (file)
  */
 
 #include "common/entity_name.h"
-#include "include/msgr.h"
 
-#include <errno.h>
 #include <sstream>
-#include <string>
 
 using std::string;
 
index 66576cc1af250a169a937384f12bf8c75fa56da2..e30b75f701fb9f90447b80f6dc34d8cfe27c3839 100644 (file)
 #define CEPH_COMMON_ENTITY_NAME_H
 
 #include <ifaddrs.h>
-#include <netinet/in.h>
-#include <iosfwd>
-#include <stdint.h>
-#include <string>
 
-#include "include/encoding.h"
-#include "include/buffer_fwd.h"
 #include "msg/msg_types.h"
 
 /* Represents a Ceph entity name.
index da06991baeaf2d1fda1d7105d6d944e25f0d8efa..69e54254bab1cad85553083e56f470c9eecc9dd9 100644 (file)
@@ -2,8 +2,6 @@
 #include "acconfig.h"
 
 #include <sstream>
-#include <string>
-
 #include <string.h>
 
 std::string cpp_strerror(int err)