cleanup includes
cover cleanup includes
This patch series removes several twice included header files from the source files.
Danny Al-Gaaf (30):
fusetrace_ll.cc: remove twice included sys/time.h ceph_fuse.cc: remove twice included sys/stat.h ceph_mds.cc: remove twice included sys/stat.h ceph_mon.cc: remove twice included sys/stat.h ceph_osd.cc: remove twice included sys/stat.h ceph_syn.cc: remove twice included sys/stat.h client/Client.cc: remove twice included headers client/MetaRequest.cc: remove twice included client/Dentry.h client/SyntheticClient.cc: remove twice included headers common/pipe.c: remove twice included unistd.h crushtool.cc: remove twice included sys/stat.h monmaptool.cc: remove twice included sys/stat.h include/buffer.h: remove twice included stdio.h librados/RadosClient.cc: remove twice included sys/stat.h mds/Dumper.h: remove twice included msg/Messenger.h mds/Migrator.cc: remove twice included Migrator.h mds/Resetter.h: remove twice included msg/Messenger.h mds/journal.cc: remove twice included common/config.h messages/MClientRequest.h: remove twice included sys/types.h mon/Monitor.cc: remove twice included osd/OSDMap.h mount/canonicalize.c: remove twice included string.h os/DBObjectMap.cc: remove twice included headers os/DBObjectMap.h: remove twice included <string> os/IndexManager.cc: remove twice included FlatIndex.h osd/OSD.h: remove twice included OpRequest.h osdmaptool.cc: remove twice included sys/stat.h rados.cc: remove twice included headers
remove twice included linux/types.h rgw/rgw_rest.cc: remove twice included rgw_formats.h tools/common.cc: remove twice included headers
fusetrace/fusetrace_ll.cc | 1 - qa/workunits/direct_io/test_sync_io.c | 1 - src/ceph_fuse.cc | 1 - src/ceph_mds.cc | 1 - src/ceph_mon.cc | 1 - src/ceph_osd.cc | 1 - src/ceph_syn.cc | 1 - src/client/Client.cc | 6 ------ src/client/MetaRequest.cc | 1 - src/client/SyntheticClient.cc | 2 -- src/common/pipe.c | 1 - src/crushtool.cc | 2 -- src/include/buffer.h | 1 - src/librados/RadosClient.cc | 1 - src/mds/Dumper.h | 1 - src/mds/Migrator.cc | 1 - src/mds/Resetter.h | 1 - src/mds/journal.cc | 3 --- src/messages/MClientRequest.h | 1 - src/mon/Monitor.cc | 2 -- src/monmaptool.cc | 1 - src/mount/canonicalize.c | 1 - src/os/DBObjectMap.cc | 2 -- src/os/DBObjectMap.h | 1 - src/os/IndexManager.cc | 1 - src/osd/OSD.h | 1 - src/osdmaptool.cc | 1 - src/rados.cc | 4 ---- src/rgw/rgw_rest.cc | 2 -- src/tools/common.cc | 2 -- 30 files changed, 46 deletions(-)
Signature · 1 line
1.8.0
PATCH 1/30 fusetrace_ll.cc: remove twice included sys/time.h
Fix includes: remove twice included sys/time.h
--- fusetrace/fusetrace_ll.cc | 1 - 1 file changed, 1 deletion(-)
fusetrace/fusetrace_ll.cc +0 -1
@@ -30,7 +30,6 @@ #ifdef HAVE_SETXATTR #include <sys/xattr.h> #endif -#include <sys/time.h> #include <time.h>
Signature · 1 line
1.8.0
PATCH 2/30 ceph_fuse.cc: remove twice included sys/stat.h
In reply to Danny Al-GaafFix includes: remove twice included sys/stat.h
--- src/ceph_fuse.cc | 1 - 1 file changed, 1 deletion(-)
src/ceph_fuse.cc +0 -1
@@ -37,7 +37,6 @@ using namespace std; #endif // DARWIN #include <sys/types.h> -#include <sys/stat.h> #include <fcntl.h> void usage()
Signature · 1 line
1.8.0
PATCH 3/30 ceph_mds.cc: remove twice included sys/stat.h
In reply to Danny Al-GaafFix includes: remove twice included sys/stat.h
--- src/ceph_mds.cc | 1 - 1 file changed, 1 deletion(-)
src/ceph_mds.cc +0 -1
@@ -16,7 +16,6 @@ #include <sys/stat.h> #include <fcntl.h> -#include <sys/stat.h> #include <iostream> #include <string> using namespace std;
Signature · 1 line
1.8.0
PATCH 4/30 ceph_mon.cc: remove twice included sys/stat.h
In reply to Danny Al-GaafFix includes: remove twice included sys/stat.h
--- src/ceph_mon.cc | 1 - 1 file changed, 1 deletion(-)
src/ceph_mon.cc +0 -1
@@ -16,7 +16,6 @@ #include <sys/stat.h> #include <fcntl.h> -#include <sys/stat.h> #include <iostream> #include <string> using namespace std;
Signature · 1 line
1.8.0
PATCH 5/30 ceph_osd.cc: remove twice included sys/stat.h
In reply to Danny Al-GaafFix includes: remove twice included sys/stat.h
--- src/ceph_osd.cc | 1 - 1 file changed, 1 deletion(-)
src/ceph_osd.cc +0 -1
@@ -17,7 +17,6 @@ #include <fcntl.h> #include <uuid/uuid.h> -#include <sys/stat.h> #include <iostream> #include <string> using namespace std;
Signature · 1 line
1.8.0
PATCH 6/30 ceph_syn.cc: remove twice included sys/stat.h
In reply to Danny Al-GaafFix includes: remove twice included sys/stat.h
--- src/ceph_syn.cc | 1 - 1 file changed, 1 deletion(-)
src/ceph_syn.cc +0 -1
@@ -36,7 +36,6 @@ using namespace std; #endif // DARWIN || __FreeBSD__ #include <sys/types.h> -#include <sys/stat.h> #include <fcntl.h> extern int syn_filer_flags;
Signature · 1 line
1.8.0
PATCH 7/30 client/Client.cc: remove twice included headers
In reply to Danny Al-GaafFix includes: remove twice included common/config.h". Remove include of sys/param.h in special __FreeBSD__ section, since this file is included in general anyway
--- src/client/Client.cc | 6 ------ 1 file changed, 6 deletions(-)
src/client/Client.cc +0 -6
@@ -25,10 +25,6 @@ #include <sys/statvfs.h> -#if defined(__FreeBSD__) -#include <sys/param.h> -#endif - #include <iostream> using namespace std;
@@ -67,8 +63,6 @@ using namespace std; #include "common/admin_socket.h" #include "common/errno.h" -#include "common/config.h" - #define dout_subsys ceph_subsys_client #include "include/lru.h"
Signature · 1 line
1.8.0
PATCH 8/30 client/MetaRequest.cc: remove twice included client/Dentry.h
In reply to Danny Al-GaafFix includes: remove twice included client/Dentry.h
--- src/client/MetaRequest.cc | 1 - 1 file changed, 1 deletion(-)
src/client/MetaRequest.cc +0 -1
@@ -5,7 +5,6 @@ #include "client/MetaRequest.h" #include "client/Dentry.h" #include "client/Inode.h" -#include "client/Dentry.h" #include "messages/MClientReply.h" #include "common/Formatter.h"
Signature · 1 line
1.8.0
PATCH 9/30 client/SyntheticClient.cc: remove twice included headers
In reply to Danny Al-GaafFix includes: remove twice included common/config.h and sys/types.h
--- src/client/SyntheticClient.cc | 2 -- 1 file changed, 2 deletions(-)
src/client/SyntheticClient.cc +0 -2
@@ -29,12 +29,10 @@ using namespace std; #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> -#include <sys/types.h> #include <utime.h> #include <math.h> #include <sys/statvfs.h> -#include "common/config.h" #include "include/assert.h" #define dout_subsys ceph_subsys_client
Signature · 1 line
1.8.0
PATCH 10/30 common/pipe.c: remove twice included unistd.h
In reply to Danny Al-GaafFix includes: remove twice included unistd.h
--- src/common/pipe.c | 1 - 1 file changed, 1 deletion(-)
src/common/pipe.c +0 -1
@@ -17,7 +17,6 @@#include <errno.h> #include <fcntl.h> #include <unistd.h> -#include <unistd.h> int pipe_cloexec (int pipefd[2 ]) {
Signature · 1 line
1.8.0
PATCH 11/30 crushtool.cc: remove twice included sys/stat.h
In reply to Danny Al-GaafFix includes: remove twice included sys/stat.h
--- src/crushtool.cc | 2 -- 1 file changed, 2 deletions(-)
src/crushtool.cc +0 -2
@@ -17,8 +17,6 @@ #include <fcntl.h> #include <errno.h> -#include <sys/stat.h> - #include <fstream> #include "common/debug.h"
Signature · 1 line
1.8.0
PATCH 12/30 monmaptool.cc: remove twice included sys/stat.h
In reply to Danny Al-GaafFix includes: remove twice included sys/stat.h
--- src/monmaptool.cc | 1 - 1 file changed, 1 deletion(-)
src/monmaptool.cc +0 -1
@@ -17,7 +17,6 @@ #include <fcntl.h> #include <errno.h> -#include <sys/stat.h> #include <iostream> #include <string> using namespace std;
Signature · 1 line
1.8.0
PATCH 13/30 include/buffer.h: remove twice included stdio.h
In reply to Danny Al-GaafFix includes: remove twice included stdio.h
--- src/include/buffer.h | 1 - 1 file changed, 1 deletion(-)
src/include/buffer.h +0 -1
@@ -46,7 +46,6 @@ void *valloc(size_t);#endif #include <stdint.h> -#include <stdio.h> // snprintf #include <string.h> #ifndef __CYGWIN__
Signature · 1 line
1.8.0
PATCH 14/30 librados/RadosClient.cc: remove twice included sys/stat.h
In reply to Danny Al-GaafFix includes: remove twice included sys/stat.h
--- src/librados/RadosClient.cc | 1 - 1 file changed, 1 deletion(-)
src/librados/RadosClient.cc +0 -1
@@ -16,7 +16,6 @@ #include <sys/stat.h> #include <fcntl.h> -#include <sys/stat.h> #include <iostream> #include <string> #include <pthread.h>
Signature · 1 line
1.8.0
PATCH 15/30 mds/Dumper.h: remove twice included msg/Messenger.h
In reply to Danny Al-GaafFix includes: remove twice included msg/Messenger.h
--- src/mds/Dumper.h | 1 - 1 file changed, 1 deletion(-)
src/mds/Dumper.h +0 -1
@@ -19,7 +19,6 @@#include "osdc/Journaler.h" #include "msg/Dispatcher.h" #include "msg/Messenger.h" -#include "msg/Messenger.h" #include "auth/Auth.h" /**
Signature · 1 line
1.8.0
PATCH 16/30 mds/Migrator.cc: remove twice included Migrator.h
In reply to Danny Al-GaafFix includes: remove twice included Migrator.h
--- src/mds/Migrator.cc | 1 - 1 file changed, 1 deletion(-)
src/mds/Migrator.cc +0 -1
@@ -19,7 +19,6 @@ #include "CDentry.h" #include "Migrator.h" #include "Locker.h" -#include "Migrator.h" #include "Server.h" #include "MDBalancer.h"
Signature · 1 line
1.8.0
PATCH 17/30 mds/Resetter.h: remove twice included msg/Messenger.h
In reply to Danny Al-GaafFix includes: remove twice included msg/Messenger.h
--- src/mds/Resetter.h | 1 - 1 file changed, 1 deletion(-)
src/mds/Resetter.h +0 -1
@@ -19,7 +19,6 @@#include "osdc/Journaler.h" #include "msg/Dispatcher.h" #include "msg/Messenger.h" -#include "msg/Messenger.h" #include "auth/Auth.h" /**
Signature · 1 line
1.8.0
PATCH 18/30 mds/journal.cc: remove twice included common/config.h
In reply to Danny Al-GaafFix includes: remove twice included common/config.h
--- src/mds/journal.cc | 3 --- 1 file changed, 3 deletions(-)
src/mds/journal.cc +0 -3
@@ -51,9 +51,6 @@ #include "Locker.h" - -#include "common/config.h" - #define dout_subsys ceph_subsys_mds #undef DOUT_COND #define DOUT_COND(cct, l) (l<=cct->_conf->debug_mds || l <= cct->_conf->debug_mds_log \
Signature · 1 line
1.8.0
PATCH 19/30 messages/MClientRequest.h: remove twice included sys/types.h
In reply to Danny Al-GaafFix includes: remove twice included sys/types.h
--- src/messages/MClientRequest.h | 1 - 1 file changed, 1 deletion(-)
src/messages/MClientRequest.h +0 -1
@@ -40,7 +40,6 @@#include <sys/types.h> #include <utime.h> #include <sys/stat.h> -#include <sys/types.h> #include <fcntl.h>
Signature · 1 line
1.8.0
PATCH 20/30 mon/Monitor.cc: remove twice included osd/OSDMap.h
In reply to Danny Al-GaafFix includes: remove twice included osd/OSDMap.h
--- src/mon/Monitor.cc | 2 -- 1 file changed, 2 deletions(-)
src/mon/Monitor.cc +0 -2
@@ -65,8 +65,6 @@ #include "LogMonitor.h" #include "AuthMonitor.h" -#include "osd/OSDMap.h" - #include "auth/AuthMethodList.h" #include "auth/KeyRing.h"
Signature · 1 line
1.8.0
PATCH 21/30 mount/canonicalize.c: remove twice included string.h
In reply to Danny Al-GaafFix includes: remove twice included string.h
--- src/mount/canonicalize.c | 1 - 1 file changed, 1 deletion(-)
src/mount/canonicalize.c +0 -1
@@ -24,7 +24,6 @@#include <string.h> #include <ctype.h> #include <unistd.h> -#include <string.h> #include <errno.h> #include <stdlib.h> #include <limits.h>
Signature · 1 line
1.8.0
PATCH 22/30 os/DBObjectMap.cc: remove twice included headers
In reply to Danny Al-GaafFix includes: remove twice included <string> and <tr1/memory>
--- src/os/DBObjectMap.cc | 2 -- 1 file changed, 2 deletions(-)
src/os/DBObjectMap.cc +0 -2
@@ -8,9 +8,7 @@ #include <string> #include <tr1/memory> -#include <string> #include <vector> -#include <tr1/memory> #include "ObjectMap.h" #include "KeyValueDB.h"
Signature · 1 line
1.8.0
PATCH 23/30 os/DBObjectMap.h: remove twice included <string>
In reply to Danny Al-GaafFix includes: remove twice included <string>
--- src/os/DBObjectMap.h | 1 - 1 file changed, 1 deletion(-)
src/os/DBObjectMap.h +0 -1
@@ -7,7 +7,6 @@#include <map> #include <string> -#include <string> #include <vector> #include <tr1/memory> #include <boost/scoped_ptr.hpp>
Signature · 1 line
1.8.0
PATCH 24/30 os/IndexManager.cc: remove twice included FlatIndex.h
In reply to Danny Al-GaafFix includes: remove twice included FlatIndex.h
--- src/os/IndexManager.cc | 1 - 1 file changed, 1 deletion(-)
src/os/IndexManager.cc +0 -1
@@ -30,7 +30,6 @@ #include "IndexManager.h" #include "FlatIndex.h" #include "HashIndex.h" -#include "FlatIndex.h" #include "CollectionIndex.h" #include "chain_xattr.h"
Signature · 1 line
1.8.0
PATCH 25/30 osd/OSD.h: remove twice included OpRequest.h
In reply to Danny Al-GaafFix includes: remove twice included OpRequest.h
--- src/osd/OSD.h | 1 - 1 file changed, 1 deletion(-)
src/osd/OSD.h +0 -1
@@ -49,7 +49,6 @@ using namespace std;#include <ext/hash_set> using namespace __gnu_cxx; -#include "OpRequest.h" #include "common/shared_cache.hpp" #include "common/simple_cache.hpp" #include "common/sharedptr_registry.hpp"
Signature · 1 line
1.8.0
PATCH 26/30 osdmaptool.cc: remove twice included sys/stat.h
In reply to Danny Al-GaafFix includes: remove twice included sys/stat.h
--- src/osdmaptool.cc | 1 - 1 file changed, 1 deletion(-)
src/osdmaptool.cc +0 -1
@@ -17,7 +17,6 @@ #include <fcntl.h> #include <errno.h> -#include <sys/stat.h> #include <iostream> #include <string> using namespace std;
Signature · 1 line
1.8.0
PATCH 27/30 rados.cc: remove twice included headers
In reply to Danny Al-GaafFix includes: remove twice included common/obj_bencher.h and common/errno.h
--- src/rados.cc | 4 ---- 1 file changed, 4 deletions(-)
src/rados.cc +0 -4
@@ -18,8 +18,6 @@ #include "rados_sync.h" using namespace librados; -#include "common/obj_bencher.h" - #include "common/config.h" #include "common/ceph_argparse.h" #include "global/global_init.h"
@@ -42,8 +40,6 @@ using namespace librados; #include <climits> #include <locale> -#include "common/errno.h" - #include "cls/lock/cls_lock_client.h" int rados_tool_sync(const std::map < std::string, std::string > &opts,
Signature · 1 line
1.8.0
PATCH 28/30 remove twice included linux/types.h
In reply to Danny Al-GaafCleanup includes: remove twice included linux/types.h
--- qa/workunits/direct_io/test_sync_io.c | 1 - 1 file changed, 1 deletion(-)
qa/workunits/direct_io/test_sync_io.c +0 -1
@@ -12,7 +12,6 @@//#include "../client/ioctl.h" #include <linux/ioctl.h> -#include <linux/types.h> #define CEPH_IOCTL_MAGIC 0x97#define CEPH_IOC_SYNCIO _IO(CEPH_IOCTL_MAGIC, 5)
Signature · 1 line
1.8.0
PATCH 29/30 rgw/rgw_rest.cc: remove twice included rgw_formats.h
In reply to Danny Al-GaafCleanup includes: Remove twice included rgw_formats.h
--- src/rgw/rgw_rest.cc | 2 -- 1 file changed, 2 deletions(-)
src/rgw/rgw_rest.cc +0 -2
@@ -12,8 +12,6 @@ #include "rgw_rest_s3.h" #include "rgw_swift_auth.h" -#include "rgw_formats.h" - #include "rgw_client_io.h" #include "rgw_resolve.h"
Signature · 1 line
1.8.0
PATCH 30/30 tools/common.cc: remove twice included headers
In reply to Danny Al-GaafCleanup includes: Remove twice included sys/stat.h and osd/OSDMap.h.
--- src/tools/common.cc | 2 -- 1 file changed, 2 deletions(-)
src/tools/common.cc +0 -2
@@ -23,7 +23,6 @@ using namespace std; #include <memory> #include <sys/types.h> -#include <sys/stat.h> #include <fcntl.h> extern "C" {
@@ -81,7 +80,6 @@ float tick_interval = 3.0; // observe (push) #include "mon/PGMap.h" -#include "osd/OSDMap.h" #include "mds/MDSMap.h" #include "common/LogEntry.h"
Signature · 1 line
1.8.0
Sage Weil
AppliedMerged, thanks!
sage
Quoted 71 lines · Danny Al-Gaaf
This patch series removes several twice included header files from the source files.
Danny Al-Gaaf (30):
fusetrace_ll.cc: remove twice includedsys/time.hceph_fuse.cc: remove twice includedsys/stat.hceph_mds.cc: remove twice includedsys/stat.hceph_mon.cc: remove twice includedsys/stat.hceph_osd.cc: remove twice includedsys/stat.hceph_syn.cc: remove twice includedsys/stat.hclient/Client.cc: remove twice included headers client/MetaRequest.cc: remove twice includedclient/Dentry.hclient/SyntheticClient.cc: remove twice included headerscommon/pipe.c: remove twice includedunistd.hcrushtool.cc: remove twice includedsys/stat.hmonmaptool.cc: remove twice includedsys/stat.hinclude/buffer.h: remove twice includedstdio.hlibrados/RadosClient.cc: remove twice includedsys/stat.hmds/Dumper.h: remove twice includedmsg/Messenger.hmds/Migrator.cc: remove twice includedMigrator.hmds/Resetter.h: remove twice includedmsg/Messenger.hmds/journal.cc: remove twice includedcommon/config.hmessages/MClientRequest.h: remove twice includedsys/types.hmon/Monitor.cc: remove twice includedosd/OSDMap.hmount/canonicalize.c: remove twice includedstring.hos/DBObjectMap.cc: remove twice included headersos/DBObjectMap.h: remove twice included <string> os/IndexManager.cc: remove twice includedFlatIndex.hosd/OSD.h: remove twice includedOpRequest.hosdmaptool.cc: remove twice includedsys/stat.hrados.cc: remove twice included headers
remove twice includedlinux/types.hrgw/rgw_rest.cc: remove twice includedrgw_formats.htools/common.cc: remove twice included headersfusetrace/fusetrace_ll.cc | 1 - qa/workunits/direct_io/test_sync_io.c | 1 - src/ceph_fuse.cc | 1 - src/ceph_mds.cc | 1 - src/ceph_mon.cc | 1 - src/ceph_osd.cc | 1 - src/ceph_syn.cc | 1 - src/client/Client.cc | 6 ------ src/client/MetaRequest.cc | 1 - src/client/SyntheticClient.cc | 2 -- src/common/pipe.c | 1 - src/crushtool.cc | 2 -- src/include/buffer.h | 1 - src/librados/RadosClient.cc | 1 - src/mds/Dumper.h | 1 - src/mds/Migrator.cc | 1 - src/mds/Resetter.h | 1 - src/mds/journal.cc | 3 --- src/messages/MClientRequest.h | 1 - src/mon/Monitor.cc | 2 -- src/monmaptool.cc | 1 - src/mount/canonicalize.c | 1 - src/os/DBObjectMap.cc | 2 -- src/os/DBObjectMap.h | 1 - src/os/IndexManager.cc | 1 - src/osd/OSD.h | 1 - src/osdmaptool.cc | 1 - src/rados.cc | 4 ---- src/rgw/rgw_rest.cc | 2 -- src/tools/common.cc | 2 -- 30 files changed, 46 deletions(-)Signature · 1 line
1.8.0