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 - 4 #15251

Merged
merged 2 commits into from Jun 16, 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
8 changes: 0 additions & 8 deletions src/common/Cond.h
Expand Up @@ -16,16 +16,8 @@
#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;
Expand Down
6 changes: 0 additions & 6 deletions src/common/ConfUtils.cc
Expand Up @@ -13,13 +13,8 @@
*/

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

Expand All @@ -28,7 +23,6 @@
#include "common/utf8.h"
#include "common/ConfUtils.h"

using std::cerr;
using std::ostringstream;
using std::pair;
using std::string;
Expand Down
1 change: 0 additions & 1 deletion src/common/ContextCompletion.h
Expand Up @@ -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 {
Expand Down
6 changes: 0 additions & 6 deletions src/common/Cycles.cc
Expand Up @@ -28,13 +28,7 @@
* 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;
Expand Down
2 changes: 0 additions & 2 deletions src/common/DecayCounter.h
Expand Up @@ -17,8 +17,6 @@

#include "include/utime.h"

#include <math.h>

/**
*
* TODO: normalize value based on some fucntion of half_life,
Expand Down
5 changes: 0 additions & 5 deletions src/common/code_environment.cc
Expand Up @@ -11,15 +11,10 @@
* 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>
Expand Down
10 changes: 1 addition & 9 deletions src/common/cohort_lru.h
Expand Up @@ -13,16 +13,8 @@
#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
Expand Down
13 changes: 0 additions & 13 deletions src/common/common_init.cc
Expand Up @@ -14,22 +14,9 @@

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

Expand Down
3 changes: 0 additions & 3 deletions src/common/common_init.h
Expand Up @@ -16,9 +16,6 @@
#define CEPH_COMMON_INIT_H

#include <deque>
#include <stdint.h>
#include <string>
#include <vector>

#include "common/code_environment.h"

Expand Down
21 changes: 0 additions & 21 deletions src/common/config.cc
Expand Up @@ -12,36 +12,17 @@
*
*/

#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
Expand All @@ -57,10 +38,8 @@

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"
Expand Down
8 changes: 0 additions & 8 deletions src/common/config.h
Expand Up @@ -15,19 +15,11 @@
#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,
Expand Down
5 changes: 1 addition & 4 deletions src/common/config_validators.cc
Expand Up @@ -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>

Expand Down
5 changes: 0 additions & 5 deletions src/common/deleter.h
Expand Up @@ -23,11 +23,6 @@
#define CEPH_COMMON_DELETER_H

#include <atomic>
#include <memory>
#include <cstdlib>
#include <type_traits>

#include "include/assert.h"

/// \addtogroup memory-module
/// @{
Expand Down
8 changes: 0 additions & 8 deletions src/common/dns_resolve.cc
Expand Up @@ -12,18 +12,10 @@
*
*/

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

Expand Down
3 changes: 0 additions & 3 deletions src/common/dns_resolve.h
Expand Up @@ -14,13 +14,10 @@
#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;

Expand Down
6 changes: 0 additions & 6 deletions src/common/dout.h
Expand Up @@ -21,12 +21,6 @@
#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);
Expand Down
3 changes: 0 additions & 3 deletions src/common/entity_name.cc
Expand Up @@ -13,11 +13,8 @@
*/

#include "common/entity_name.h"
#include "include/msgr.h"

#include <errno.h>
#include <sstream>
#include <string>

using std::string;

Expand Down
6 changes: 0 additions & 6 deletions src/common/entity_name.h
Expand Up @@ -16,13 +16,7 @@
#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.
Expand Down
2 changes: 0 additions & 2 deletions src/common/errno.cc
Expand Up @@ -2,8 +2,6 @@
#include "acconfig.h"

#include <sstream>
#include <string>

#include <string.h>

std::string cpp_strerror(int err)
Expand Down