]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common: Remove redundant includes 15042/head
authorBrad Hubbard <bhubbard@redhat.com>
Thu, 11 May 2017 03:12:16 +0000 (13:12 +1000)
committerBrad Hubbard <bhubbard@redhat.com>
Fri, 12 May 2017 22:57:45 +0000 (08:57 +1000)
Fixes: http://tracker.ceph.com/issues/19883 (Partially)
Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
22 files changed:
src/auth/AuthServiceHandler.h
src/cls/journal/cls_journal_types.h
src/cls/lua/cls_lua_client.cc
src/cls/lua/cls_lua_client.h
src/cls/lua/cls_lua_ops.h
src/common/Graylog.cc
src/common/TextTable.h
src/common/addr_parsing.c
src/common/buffer.cc
src/common/entity_name.h
src/common/ipaddr.cc
src/common/module.c
src/common/pick_address.cc
src/common/secret.c
src/crush/builder.c
src/crush/builder.h
src/include/fs_types.h
src/include/ipaddr.h
src/librados/RadosXattrIter.h
src/os/filestore/chain_xattr.cc
src/os/filestore/chain_xattr.h
src/test/test_ipaddr.cc

index 6bd8bd97634a14573891ffa52db26a697f58810b..4d8a649374ffe40b55b39c32057f6a7a59bd9e34 100644 (file)
 #ifndef CEPH_AUTHSERVICEHANDLER_H
 #define CEPH_AUTHSERVICEHANDLER_H
 
-#include "include/types.h"
-#include "Auth.h"
+#include <stddef.h>              // for NULL
+#include <stdint.h>              // for uint64_t
+#include "common/entity_name.h"  // for EntityName
+#include "include/buffer_fwd.h"  // for bufferlist
 
 class CephContext;
 class KeyServer;
+struct AuthCapsInfo;
 
 struct AuthServiceHandler {
 protected:
index 4e1f2d7fd6e1013abd1cd3108b9e952cbf104cd6..f2cb841973f4327a7ed95a6208ea94d7b10bc688 100644 (file)
@@ -9,7 +9,6 @@
 #include "include/encoding.h"
 #include <iosfwd>
 #include <list>
-#include <set>
 #include <string>
 
 namespace ceph {
index 95dd2bb60434063f3837893e0c0aa9b38380c576..44348270c80c4001095b3c7b29f74d3c220b4125 100644 (file)
@@ -1,10 +1,7 @@
-#include <errno.h>
 #include <string>
 #include <vector>
 #include "include/encoding.h"
-#include "include/rados.h"
-#include "include/rados/librados.h"
-#include "include/types.h"
+#include "include/rados/librados.hpp"  // for IoCtx
 #include "cls_lua_client.h"
 #include "cls_lua_ops.h"
 
index fd049247add081107e4c0f4cdb4f3a4ac26bf3f6..e37906993c9f98cb3d5c2c9818f5506093069fba 100644 (file)
@@ -1,8 +1,12 @@
 #ifndef CLS_LUA_CLIENT_HPP
 #define CLS_LUA_CLIENT_HPP
 #include <string>
-#include <vector>
-#include "include/rados/librados.hpp"
+
+#include "include/buffer_fwd.h"  // for bufferlist
+
+namespace librados {
+  class IoCtx;
+}
 
 namespace cls_lua_client {
   int exec(librados::IoCtx& ioctx, const std::string& oid,
index ed297922044e6b6ea8f3c86e762b21811cb09d7b..2bf95051d34c3b25da3011d9b8a288cfe17e8fbf 100644 (file)
@@ -2,8 +2,8 @@
 #define CEPH_CLS_LUA_OPS_H
 
 struct cls_lua_eval_op {
-  string script;
-  string handler;
+  std::string script;
+  std::string handler;
   bufferlist input;
 
   void encode(bufferlist &bl) const {
index ff2935151a345553600b5f4856448aeb07212523..a8fd8a99d29ba9762440901787c28da4d48f6aea 100644 (file)
@@ -4,9 +4,6 @@
 #include "Graylog.h"
 
 #include <iostream>
-#include <sstream>
-
-#include <arpa/inet.h>
 
 #include "common/Formatter.h"
 #include "common/LogEntry.h"
index 60c982a7e5ff656d2f8e6653686946205eef4642..88866d1e19d80ffb98a409f59bf1331f69a141d1 100644 (file)
@@ -17,7 +17,6 @@
 
 #include <vector>
 #include <sstream>
-#include <iomanip>
 #include <string>
 #include "include/assert.h"
 
index ae7555765004db6bb1d427f974f33fa5391996ec..50694402980548f8dc30ccd1de067ae555d08410 100644 (file)
@@ -12,7 +12,6 @@
  *
  */
 
-#include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 957f5da8c56812a1f8c7853c10d5d0bd03a93657..caf08729f20046c109395324100f71150353aef6 100644 (file)
@@ -26,7 +26,6 @@
 #include "include/atomic.h"
 #include "common/RWLock.h"
 #include "include/types.h"
-#include "include/compat.h"
 #include "include/inline_memory.h"
 #include "include/scope_guard.h"
 #if defined(HAVE_XIO)
 #endif
 
 #include <errno.h>
-#include <fstream>
-#include <sstream>
 #include <sys/uio.h>
 #include <limits.h>
 
 #include <atomic>
-#include <ostream>
 
 #define CEPH_BUFFER_ALLOC_UNIT  (MIN(CEPH_PAGE_SIZE, 4096))
 #define CEPH_BUFFER_APPEND_SIZE (CEPH_BUFFER_ALLOC_UNIT - sizeof(raw_combined))
index d1c6cbcdd7be5729dc98db594db85c87b275561a..66576cc1af250a169a937384f12bf8c75fa56da2 100644 (file)
@@ -15,6 +15,8 @@
 #ifndef CEPH_COMMON_ENTITY_NAME_H
 #define CEPH_COMMON_ENTITY_NAME_H
 
+#include <ifaddrs.h>
+#include <netinet/in.h>
 #include <iosfwd>
 #include <stdint.h>
 #include <string>
index a7dedf257095beb28287644794d92eeb3b3c68f2..55ac722d66672d6c29ed31488a71d8bcc966a147 100644 (file)
@@ -1,10 +1,13 @@
 #include "include/ipaddr.h"
 
-#include <sys/socket.h>
+#include <alloca.h>
 #include <arpa/inet.h>
+#include <ifaddrs.h>
+#include <netinet/in.h>
+#include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
-
+#include <sys/socket.h>
 
 static void netmask_ipv4(const struct in_addr *addr,
                         unsigned int prefix_len,
index b251274a5f1aa6bbbde42ce0c0f12e6f4cd718cb..06b32ed7d3ea93c9dc024c3f00bfe6cd0efa8da0 100644 (file)
@@ -15,8 +15,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <sys/wait.h>
-#include <unistd.h>
 
 /*
  * TODO: Switch to libkmod when we abandon older platforms.  The APIs
index 5f910d541e63d172a91511979f09697901866eab..4291cce8cbcd3aae3312367ac77460416e5fef22 100644 (file)
@@ -16,6 +16,7 @@
 
 #include <netdb.h>
 #include <errno.h>
+#include <ifaddrs.h>
 
 #include "include/ipaddr.h"
 #include "include/str_list.h"
index 82150930eabe832c85136d4d66cb262d02660f37..b6f26ec3ece5c2e9af3107230828f91d392f76f9 100644 (file)
 
 #include <string.h>
 #include <stdio.h>
-#include <stdlib.h>
 #include <unistd.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <keyutils.h>
-#include <sys/types.h>
 
 #include "common/armor.h"
 #include "common/safe_io.h"
index ec11d6c1f9dc9a44609d1c13fecd1fc5ba524530..dc342d28a0168ceaa14952676a5933854fc28bc1 100644 (file)
@@ -1,15 +1,12 @@
 #include <string.h>
-#include <limits.h>
 #include <math.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <assert.h>
 #include <errno.h>
 
-#include "include/int_types.h"
-
+#include "crush/crush.h"
 #include "builder.h"
-#include "hash.h"
 
 #define dprintk(args...) /* printf(args) */
 
index e1db9a5a069c008b9ed9102ea0970c59e84781fd..ffb5eaf22dbc1d03f983dba3389bb58d68b0242d 100644 (file)
@@ -1,7 +1,12 @@
 #ifndef CEPH_CRUSH_BUILDER_H
 #define CEPH_CRUSH_BUILDER_H
 
-#include "crush.h"
+#include "include/int_types.h"
+
+struct crush_bucket;
+struct crush_choose_arg;
+struct crush_map;
+struct crush_rule;
 
 /** @ingroup API
  *
index 161d44104eca743f7a75c8da7b1b9020e44a67fb..5513fcefd792229488fe0520af0a9abeecea95c8 100644 (file)
@@ -4,7 +4,6 @@
 #define CEPH_INCLUDE_FS_TYPES_H
 
 #include "types.h"
-#include "utime.h"
 
 // --------------------------------------
 // ino
index bf1a08308991d46e2ee9f645bcb6deb13068b4e8..ac0dc620facf52e9974593df09195044cddb2e76 100644 (file)
@@ -1,10 +1,6 @@
 #ifndef CEPH_IPADDR_H
 #define CEPH_IPADDR_H
 
-#include <netinet/in.h>
-#include <sys/types.h>
-#include <ifaddrs.h>
-
 /*
   Find an IP address that is in the wanted subnet.
 
index 35c87043840339378e7dbb388729034c7b91f053..6b232bd5873eea52fcef6f5920736cebda7def35 100644 (file)
@@ -18,7 +18,7 @@
 #include <string>
 #include <map>
 
-#include "include/buffer.h"
+#include "include/buffer.h"  // for bufferlist
 
 namespace librados {
 
index 0461c1953db022cf1a01afa79eb4fed83dc17517..97c547e1426f70f7f4cff2b9012f39067ba2dfc9 100644 (file)
@@ -2,29 +2,17 @@
 // vim: ts=8 sw=2 smarttab
 
 #include "chain_xattr.h"
-
-#include "include/int_types.h"
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <sys/file.h>
-#include <errno.h>
-#include <dirent.h>
-#include <sys/ioctl.h>
-#include <string.h>
-#include <stdio.h>
-#include "include/assert.h"
+#include <errno.h>           // for ERANGE, ENODATA, ENOMEM
+#include <stdio.h>           // for size_t, snprintf
+#include <stdlib.h>          // for free, malloc
+#include <string.h>          // for strcpy, strlen
+#include "include/assert.h"  // for assert
+#include "include/buffer.h"
 
 #if defined(__linux__)
 #include <linux/fs.h>
 #endif
 
-#include "common/xattr.h"
-#include "include/compat.h"
-
 /*
  * chaining xattrs
  *
index 9764c347751233dea095c5ff81bd148debade4cd..8f78643f27658d095c627bc57254f479f71f189e 100644 (file)
@@ -4,14 +4,11 @@
 #ifndef __CEPH_OSD_CHAIN_XATTR_H
 #define __CEPH_OSD_CHAIN_XATTR_H
 
-#include "include/compat.h"
+#include <errno.h>
+#include <stdio.h>
 #include "common/xattr.h"
 #include "include/assert.h"
-#include "include/buffer.h"
-#include <string.h>
-#include <stdio.h>
-
-#include <errno.h>
+#include "include/buffer_fwd.h"
 
 #if defined(__linux__)
 #include <linux/limits.h>
index ab43407ec5ed7582ccaea6d9c068f58ecca33ff9..f6ecd2de51ff97259967ac0888a9fe2e5915ddb2 100644 (file)
@@ -6,6 +6,7 @@
 #include <sys/socket.h>
 #endif
 #include <arpa/inet.h>
+#include <ifaddrs.h>
 
 static void ipv4(struct sockaddr_in *addr, const char *s) {
   int err;