Skip to content

Commit

Permalink
Merge pull request ceph#15267 from joscollin/wip-cleanup-redundant-he…
Browse files Browse the repository at this point in the history
…aders-5

common: Remove redundant includes - 5

Reviewed-by: Willem Jan Withagen <wjw@digiware.nl>
  • Loading branch information
badone committed Jun 1, 2017
2 parents bf82eb5 + dba3d3e commit 569125c
Show file tree
Hide file tree
Showing 32 changed files with 8 additions and 202 deletions.
1 change: 0 additions & 1 deletion src/common/AsyncOpTracker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// vim: ts=8 sw=2 smarttab

#include "common/AsyncOpTracker.h"
#include "include/assert.h"
#include "include/Context.h"

AsyncOpTracker::AsyncOpTracker()
Expand Down
1 change: 0 additions & 1 deletion src/common/AsyncOpTracker.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 0 additions & 5 deletions src/common/AsyncReserver.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@
#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"

Expand Down
3 changes: 0 additions & 3 deletions src/common/BackTrace.cc
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 0 additions & 1 deletion src/common/Checksummer.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#ifndef CEPH_OS_BLUESTORE_CHECKSUMMER
#define CEPH_OS_BLUESTORE_CHECKSUMMER

#include "include/buffer.h"
#include "xxHash/xxhash.h"

class Checksummer {
Expand Down
5 changes: 0 additions & 5 deletions src/common/Clock.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@


#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()
{
Expand Down
13 changes: 2 additions & 11 deletions src/common/address_helper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
22 changes: 1 addition & 21 deletions src/common/admin_socket.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,36 +12,16 @@
*
*/

#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
Expand Down
7 changes: 0 additions & 7 deletions src/common/admin_socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,6 @@
#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;
Expand Down
19 changes: 0 additions & 19 deletions src/common/admin_socket_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,12 @@
*
*/

#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;

Expand Down
1 change: 0 additions & 1 deletion src/common/admin_socket_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
11 changes: 0 additions & 11 deletions src/common/assert.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,7 @@
*
*/

#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;
Expand Down
1 change: 0 additions & 1 deletion src/common/bit_str.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 0 additions & 2 deletions src/common/bit_str.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 0 additions & 6 deletions src/common/bit_vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,7 @@

#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 {

Expand Down
6 changes: 1 addition & 5 deletions src/common/blkdev.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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__
Expand Down
2 changes: 0 additions & 2 deletions src/common/bloom_filter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
6 changes: 0 additions & 6 deletions src/common/bloom_filter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,7 @@
#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"
Expand Down
9 changes: 1 addition & 8 deletions src/common/buffer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,14 @@
#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))

Expand Down
13 changes: 0 additions & 13 deletions src/common/ceph_argparse.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,10 @@
*/

#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
Expand Down
3 changes: 0 additions & 3 deletions src/common/ceph_argparse.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,10 @@
* 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
Expand Down
17 changes: 0 additions & 17 deletions src/common/ceph_context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,36 +13,19 @@
*
*/

#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;

Expand Down
6 changes: 0 additions & 6 deletions src/common/ceph_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,10 @@
#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>

Expand Down
7 changes: 0 additions & 7 deletions src/common/ceph_crypto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,8 @@
*
*/

#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)
Expand Down
Loading

0 comments on commit 569125c

Please sign in to comment.