Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

common: Remove redundant includes - 3 #15204

Merged
merged 1 commit into from May 23, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/common/EventTrace.h
Expand Up @@ -18,9 +18,7 @@
#ifndef _EventTrace_h_
#define _EventTrace_h_

#include <string>
#include "msg/Message.h"
#include "common/ceph_context.h"

#if defined(WITH_LTTNG) && defined(WITH_EVENTTRACE)

Expand Down
2 changes: 0 additions & 2 deletions src/common/Finisher.cc
@@ -1,10 +1,8 @@
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab

#include "common/config.h"
#include "Finisher.h"

#include "common/debug.h"
#define dout_subsys ceph_subsys_finisher
#undef dout_prefix
#define dout_prefix *_dout << "finisher(" << this << ") "
Expand Down
3 changes: 0 additions & 3 deletions src/common/Finisher.h
Expand Up @@ -15,10 +15,7 @@
#ifndef CEPH_FINISHER_H
#define CEPH_FINISHER_H

#include "include/atomic.h"
#include "common/Mutex.h"
#include "common/Cond.h"
#include "common/Thread.h"
#include "common/perf_counters.h"

class CephContext;
Expand Down
9 changes: 0 additions & 9 deletions src/common/Formatter.cc
Expand Up @@ -14,22 +14,13 @@

#define LARGE_SIZE 1024

#include "assert.h"
#include "Formatter.h"
#include "HTMLFormatter.h"
#include "common/escape.h"
#include "include/buffer.h"

#include <algorithm>
#include <sstream>
#include <stdarg.h>
#include <stdio.h>
#include <vector>
#include <string>
#include <set>
#include <boost/format.hpp>


// -----------------------
namespace ceph {

Expand Down
7 changes: 1 addition & 6 deletions src/common/Formatter.h
Expand Up @@ -4,20 +4,15 @@
#define CEPH_FORMATTER_H

#include "include/int_types.h"
#include "include/buffer_fwd.h"

#include <deque>
#include <iosfwd>
#include <list>
#include <vector>
#include <stdarg.h>
#include <stddef.h>
#include <utility>
#include <sstream>
#include <string>
#include <map>

#include "include/buffer_fwd.h"

namespace ceph {

struct FormatterAttrs {
Expand Down
4 changes: 0 additions & 4 deletions src/common/Graylog.cc
Expand Up @@ -2,14 +2,10 @@
// vim: ts=8 sw=2 smarttab

#include "Graylog.h"

#include <iostream>

#include "common/Formatter.h"
#include "common/LogEntry.h"
#include "log/Entry.h"
#include "log/SubsystemMap.h"
#include "include/uuid.h"

namespace ceph {
namespace logging {
Expand Down
3 changes: 0 additions & 3 deletions src/common/Graylog.h
Expand Up @@ -4,9 +4,6 @@
#ifndef __CEPH_LOG_GRAYLOG_H
#define __CEPH_LOG_GRAYLOG_H


#include <memory>

#include <boost/asio.hpp>
#include <boost/iostreams/filtering_stream.hpp>
#include <boost/iostreams/filter/zlib.hpp>
Expand Down
2 changes: 1 addition & 1 deletion src/common/HTMLFormatter.cc
Expand Up @@ -14,8 +14,8 @@

#define LARGE_SIZE 1024

#include "Formatter.h"
#include "HTMLFormatter.h"
#include "Formatter.h"

#include <sstream>
#include <stdarg.h>
Expand Down
4 changes: 0 additions & 4 deletions src/common/HTMLFormatter.h
Expand Up @@ -3,10 +3,6 @@
#ifndef CEPH_HTML_FORMATTER_H
#define CEPH_HTML_FORMATTER_H

#include <iosfwd>
#include <stdarg.h>
#include <string>

#include "Formatter.h"

namespace ceph {
Expand Down
9 changes: 1 addition & 8 deletions src/common/HeartbeatMap.cc
Expand Up @@ -12,20 +12,13 @@
*
*/

#include <time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <pthread.h>
#include <signal.h>

#include "HeartbeatMap.h"
#include "ceph_context.h"
#include "common/errno.h"
#include "common/valgrind.h"

#include "debug.h"

#define dout_subsys ceph_subsys_heartbeatmap
#undef dout_prefix
#define dout_prefix *_dout << "heartbeat_map "
Expand Down
5 changes: 0 additions & 5 deletions src/common/HeartbeatMap.h
Expand Up @@ -15,14 +15,9 @@
#ifndef CEPH_HEARTBEATMAP_H
#define CEPH_HEARTBEATMAP_H

#include <pthread.h>

#include <string>
#include <list>
#include <time.h>

#include "include/atomic.h"

#include "RWLock.h"

class CephContext;
Expand Down
22 changes: 2 additions & 20 deletions src/common/LogClient.cc
Expand Up @@ -12,36 +12,18 @@
*
*/



#include "include/types.h"
#include "common/LogClient.h"
#include "include/str_map.h"
#include "include/uuid.h"

#include "msg/Messenger.h"
#include "msg/Message.h"

#include "messages/MLog.h"
#include "messages/MLogAck.h"
#include "mon/MonMap.h"

#include <iostream>
#include <errno.h>
#include <sys/stat.h>
#include <syslog.h>
#include "common/Graylog.h"

#ifdef DARWIN
#include <sys/param.h>
#include <sys/mount.h>
#endif // DARWIN

#include "common/Graylog.h"
// wipe the assert() introduced by boost headers included by Graylog.h
#include "include/assert.h"
#include "common/LogClient.h"

#include "common/config.h"

#define dout_subsys ceph_subsys_monc

int parse_log_client_options(CephContext *cct,
Expand Down
4 changes: 0 additions & 4 deletions src/common/LogClient.h
Expand Up @@ -18,10 +18,6 @@
#include "common/LogEntry.h"
#include "common/Mutex.h"

#include <iosfwd>
#include <sstream>
#include <atomic>

class LogClient;
class MLog;
class MLogAck;
Expand Down
3 changes: 0 additions & 3 deletions src/common/LogEntry.cc
@@ -1,11 +1,8 @@

#include <syslog.h>

#include <boost/algorithm/string/predicate.hpp>

#include "LogEntry.h"
#include "Formatter.h"

#include "include/stringify.h"

// ----
Expand Down
2 changes: 0 additions & 2 deletions src/common/LogEntry.h
Expand Up @@ -15,9 +15,7 @@
#ifndef CEPH_LOGENTRY_H
#define CEPH_LOGENTRY_H

#include "include/types.h"
#include "include/utime.h"
#include "include/encoding.h"
#include "msg/msg_types.h" // for entity_inst_t

namespace ceph {
Expand Down
6 changes: 1 addition & 5 deletions src/common/MemoryModel.cc
@@ -1,9 +1,5 @@

#include "acconfig.h"
#include "include/compat.h"
#include "include/types.h"
#include "MemoryModel.h"
#include "common/config.h"
#include "include/compat.h"
#include "debug.h"
#if defined(__linux__)
#include <malloc.h>
Expand Down
1 change: 0 additions & 1 deletion src/common/event_socket.h
Expand Up @@ -19,7 +19,6 @@

#include "include/event_type.h"
#include <unistd.h>
#include <errno.h>

class EventSocket {
int socket;
Expand Down
7 changes: 0 additions & 7 deletions src/common/fd.cc
Expand Up @@ -13,13 +13,6 @@
*/

#include "include/compat.h"
#include "fd.h"

#include <sys/types.h>
#include <unistd.h>
#include <dirent.h>
#include <errno.h>

#include "debug.h"
#include "errno.h"

Expand Down
3 changes: 0 additions & 3 deletions src/common/function_signature.h
Expand Up @@ -12,13 +12,10 @@

#include <boost/mpl/pop_front.hpp>
#include <boost/mpl/push_front.hpp>
#include <boost/function_types/is_member_function_pointer.hpp>
#include <boost/function_types/function_type.hpp>
#include <boost/function_types/result_type.hpp>
#include <boost/function_types/parameter_types.hpp>

#include <boost/type_traits.hpp>

template <typename F>
struct signature_of_member
{
Expand Down
4 changes: 0 additions & 4 deletions src/common/hex.cc
Expand Up @@ -12,12 +12,8 @@
*
*/

#include "common/debug.h"
#include "common/hex.h"

#include <stdio.h>
#include <string>

void hex2str(const char *s, int len, char *buf, int dest_len)
{
int pos = 0;
Expand Down
2 changes: 0 additions & 2 deletions src/common/histogram.h
Expand Up @@ -13,10 +13,8 @@
#ifndef CEPH_HISTOGRAM_H
#define CEPH_HISTOGRAM_H

#include <vector>
#include <list>

#include "include/intarith.h"
#include "include/encoding.h"

namespace ceph {
Expand Down
1 change: 0 additions & 1 deletion src/common/hobject.cc
@@ -1,7 +1,6 @@
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab

#include "include/types.h"
#include "hobject.h"
#include "common/Formatter.h"

Expand Down
2 changes: 0 additions & 2 deletions src/common/hobject.h
Expand Up @@ -15,9 +15,7 @@
#ifndef __CEPH_OS_HOBJECT_H
#define __CEPH_OS_HOBJECT_H

#include <string.h>
#include "include/types.h"
#include "include/object.h"
#include "include/cmp.h"

#include "json_spirit/json_spirit_value.h"
Expand Down
1 change: 0 additions & 1 deletion src/common/hostname.cc
Expand Up @@ -14,7 +14,6 @@

#include "common/hostname.h"

#include <string>
#include <unistd.h>

std::string ceph_get_hostname()
Expand Down
19 changes: 0 additions & 19 deletions src/common/inline_variant.h
Expand Up @@ -8,31 +8,12 @@
#ifndef INLINE_VARIANT_H
#define INLINE_VARIANT_H

#include <boost/utility/enable_if.hpp>
#include <boost/function_types/function_arity.hpp>
#include <boost/function_types/parameter_types.hpp>
#include <boost/function_types/result_type.hpp>
#include <boost/fusion/include/at_key.hpp>
#include <boost/fusion/include/has_key.hpp>
#include <boost/fusion/include/make_vector.hpp>
#include <boost/fusion/include/map.hpp>
#include <boost/fusion/algorithm/transformation/transform.hpp>
#include <boost/move/move.hpp>
#include <boost/mpl/contains.hpp>
#include <boost/mpl/equal_to.hpp>
#include <boost/mpl/front.hpp>
#include <boost/mpl/pop_front.hpp>
#include <boost/mpl/map.hpp>
#include <boost/mpl/void.hpp>
#include <boost/mpl/size.hpp>
#include <boost/mpl/transform.hpp>
#include <boost/mpl/unpack_args.hpp>
#include <boost/mpl/vector.hpp>
#include <boost/mpl/range_c.hpp>
#include <boost/static_assert.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/type_traits/remove_reference.hpp>
#include <boost/utility.hpp>

#include "function_signature.h"

Expand Down
5 changes: 0 additions & 5 deletions src/common/interval_map.h
Expand Up @@ -15,11 +15,6 @@
#ifndef INTERVAL_MAP_H
#define INTERVAL_MAP_H

#include <map>
#include <vector>
#include <utility>
#include <boost/optional.hpp>
#include <iostream>
#include "include/interval_set.h"

template <typename K, typename V, typename S>
Expand Down
5 changes: 2 additions & 3 deletions src/common/io_priority.cc
Expand Up @@ -12,14 +12,13 @@
*
*/

#include "io_priority.h"

#include <unistd.h>
#ifdef __linux__
#include <sys/syscall.h> /* For SYS_xxx definitions */
#endif
#include <algorithm>
#include <errno.h>

#include "io_priority.h"

pid_t ceph_gettid(void)
{
Expand Down