From 20ef211cfa5b5fcc437484a879fdc5d4c66bbaf5 Mon Sep 17 00:00:00 2001 From: ShyamsundarR Date: Thu, 29 Nov 2018 14:08:06 -0500 Subject: libglusterfs: Move devel headers under glusterfs directory libglusterfs devel package headers are referenced in code using include semantics for a program, this while it works can be better especially when dealing with out of tree xlator builds or in general out of tree devel package usage. Towards this, the following changes are done, - moved all devel headers under a glusterfs directory - Included these headers using system header notation <> in all code outside of libglusterfs - Included these headers using own program notation "" within libglusterfs This change although big, is just moving around the headers and making it correct when including these headers from other sources. This helps us correctly include libglusterfs includes without namespace conflicts. Change-Id: Id2a98854e671a7ee5d73be44da5ba1a74252423b Updates: bz#1193929 Signed-off-by: ShyamsundarR --- xlators/cluster/dht/src/dht-common.c | 12 ++++++------ xlators/cluster/dht/src/dht-common.h | 10 +++++----- xlators/cluster/dht/src/dht-diskusage.c | 8 ++++---- xlators/cluster/dht/src/dht-hashfn.c | 6 +++--- xlators/cluster/dht/src/dht-helper.c | 4 ++-- xlators/cluster/dht/src/dht-layout.c | 6 +++--- xlators/cluster/dht/src/dht-linkfile.c | 6 +++--- xlators/cluster/dht/src/dht-lock.h | 2 +- xlators/cluster/dht/src/dht-mem-types.h | 2 +- xlators/cluster/dht/src/dht-messages.h | 2 +- xlators/cluster/dht/src/dht-rebalance.c | 6 +++--- xlators/cluster/dht/src/dht-rename.c | 6 +++--- xlators/cluster/dht/src/dht-selfheal.c | 6 +++--- xlators/cluster/dht/src/dht-shared.c | 2 +- xlators/cluster/dht/src/dht.c | 2 +- xlators/cluster/dht/src/tier-common.c | 6 +++--- xlators/cluster/dht/src/tier.c | 4 ++-- xlators/cluster/dht/src/tier.h | 2 +- xlators/cluster/dht/src/unittest/dht_layout_mock.c | 6 +++--- xlators/cluster/dht/src/unittest/dht_layout_unittest.c | 4 ++-- 20 files changed, 51 insertions(+), 51 deletions(-) (limited to 'xlators/cluster/dht/src') diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index 24402399597..1d2487bd7c1 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -10,15 +10,15 @@ /* TODO: add NS locking */ -#include "glusterfs.h" -#include "xlator.h" +#include +#include #include "libxlator.h" #include "dht-common.h" #include "dht-lock.h" -#include "defaults.h" -#include "byte-order.h" -#include "quota-common-utils.h" -#include "upcall-utils.h" +#include +#include +#include +#include #include #include diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h index 580f57e6e25..6fb1c16d0d8 100644 --- a/xlators/cluster/dht/src/dht-common.h +++ b/xlators/cluster/dht/src/dht-common.h @@ -14,13 +14,13 @@ #include "dht-mem-types.h" #include "dht-messages.h" -#include "call-stub.h" +#include #include "libxlator.h" -#include "syncop.h" -#include "refcount.h" -#include "timer.h" +#include +#include +#include #include "protocol-common.h" -#include "glusterfs-acl.h" +#include #ifndef _DHT_H #define _DHT_H diff --git a/xlators/cluster/dht/src/dht-diskusage.c b/xlators/cluster/dht/src/dht-diskusage.c index 148b4f01133..4d3905ab741 100644 --- a/xlators/cluster/dht/src/dht-diskusage.c +++ b/xlators/cluster/dht/src/dht-diskusage.c @@ -10,14 +10,14 @@ /* TODO: add NS locking */ -#include "glusterfs.h" -#include "xlator.h" +#include +#include #include "dht-common.h" #include "dht-messages.h" -#include "defaults.h" +#include #include -#include "events.h" +#include int dht_du_info_cbk(call_frame_t *frame, void *cookie, xlator_t *this, int op_ret, diff --git a/xlators/cluster/dht/src/dht-hashfn.c b/xlators/cluster/dht/src/dht-hashfn.c index 2f15c0370cc..16ee6d2d405 100644 --- a/xlators/cluster/dht/src/dht-hashfn.c +++ b/xlators/cluster/dht/src/dht-hashfn.c @@ -8,10 +8,10 @@ cases as published by the Free Software Foundation. */ -#include "glusterfs.h" -#include "xlator.h" +#include +#include #include "dht-common.h" -#include "hashfn.h" +#include int dht_hash_compute_internal(int type, const char *name, uint32_t *hash_p) diff --git a/xlators/cluster/dht/src/dht-helper.c b/xlators/cluster/dht/src/dht-helper.c index 22ce8bc4d4c..12e7a4fd2c2 100644 --- a/xlators/cluster/dht/src/dht-helper.c +++ b/xlators/cluster/dht/src/dht-helper.c @@ -8,8 +8,8 @@ cases as published by the Free Software Foundation. */ -#include "glusterfs.h" -#include "xlator.h" +#include +#include #include "dht-common.h" #include "dht-lock.h" diff --git a/xlators/cluster/dht/src/dht-layout.c b/xlators/cluster/dht/src/dht-layout.c index 544b9638104..35bd3fbd25e 100644 --- a/xlators/cluster/dht/src/dht-layout.c +++ b/xlators/cluster/dht/src/dht-layout.c @@ -8,10 +8,10 @@ cases as published by the Free Software Foundation. */ -#include "glusterfs.h" -#include "xlator.h" +#include +#include #include "dht-common.h" -#include "byte-order.h" +#include #include "dht-messages.h" #include "unittest/unittest.h" diff --git a/xlators/cluster/dht/src/dht-linkfile.c b/xlators/cluster/dht/src/dht-linkfile.c index eb1695f7e05..e17c354bea6 100644 --- a/xlators/cluster/dht/src/dht-linkfile.c +++ b/xlators/cluster/dht/src/dht-linkfile.c @@ -8,9 +8,9 @@ cases as published by the Free Software Foundation. */ -#include "glusterfs.h" -#include "xlator.h" -#include "compat.h" +#include +#include +#include #include "dht-common.h" #include "dht-messages.h" diff --git a/xlators/cluster/dht/src/dht-lock.h b/xlators/cluster/dht/src/dht-lock.h index 802970adb3b..1cea8ae51ea 100644 --- a/xlators/cluster/dht/src/dht-lock.h +++ b/xlators/cluster/dht/src/dht-lock.h @@ -11,7 +11,7 @@ #ifndef _DHT_LOCK_H #define _DHT_LOCK_H -#include "xlator.h" +#include #include "dht-common.h" void diff --git a/xlators/cluster/dht/src/dht-mem-types.h b/xlators/cluster/dht/src/dht-mem-types.h index c4430741ff7..33f9832395b 100644 --- a/xlators/cluster/dht/src/dht-mem-types.h +++ b/xlators/cluster/dht/src/dht-mem-types.h @@ -11,7 +11,7 @@ #ifndef __DHT_MEM_TYPES_H__ #define __DHT_MEM_TYPES_H__ -#include "mem-types.h" +#include enum gf_dht_mem_types_ { gf_dht_mt_dht_du_t = gf_common_mt_end + 1, diff --git a/xlators/cluster/dht/src/dht-messages.h b/xlators/cluster/dht/src/dht-messages.h index 005ab57b505..afc7460151b 100644 --- a/xlators/cluster/dht/src/dht-messages.h +++ b/xlators/cluster/dht/src/dht-messages.h @@ -10,7 +10,7 @@ #ifndef _DHT_MESSAGES_H_ #define _DHT_MESSAGES_H_ -#include "glfs-message-id.h" +#include /* To add new message IDs, append new identifiers at the end of the list. * diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c index 41a587823a9..187244435d6 100644 --- a/xlators/cluster/dht/src/dht-rebalance.c +++ b/xlators/cluster/dht/src/dht-rebalance.c @@ -9,12 +9,12 @@ */ #include "dht-common.h" -#include "xlator.h" -#include "syscall.h" +#include +#include #include #include #include -#include "events.h" +#include #define GF_DISK_SECTOR_SIZE 512 #define DHT_REBALANCE_PID 4242 /* Change it if required */ diff --git a/xlators/cluster/dht/src/dht-rename.c b/xlators/cluster/dht/src/dht-rename.c index af342bdbe21..893b4513628 100644 --- a/xlators/cluster/dht/src/dht-rename.c +++ b/xlators/cluster/dht/src/dht-rename.c @@ -11,11 +11,11 @@ /* TODO: link(oldpath, newpath) fails if newpath already exists. DHT should * delete the newpath if it gets EEXISTS from link() call. */ -#include "glusterfs.h" -#include "xlator.h" +#include +#include #include "dht-common.h" #include "dht-lock.h" -#include "defaults.h" +#include int dht_rename_unlock(call_frame_t *frame, xlator_t *this); diff --git a/xlators/cluster/dht/src/dht-selfheal.c b/xlators/cluster/dht/src/dht-selfheal.c index 0e57eab5f7f..e306943edda 100644 --- a/xlators/cluster/dht/src/dht-selfheal.c +++ b/xlators/cluster/dht/src/dht-selfheal.c @@ -8,12 +8,12 @@ cases as published by the Free Software Foundation. */ -#include "glusterfs.h" -#include "xlator.h" +#include +#include #include "dht-common.h" #include "dht-messages.h" #include "dht-lock.h" -#include "glusterfs-acl.h" +#include #define DHT_SET_LAYOUT_RANGE(layout, i, srt, chunk, path) \ do { \ diff --git a/xlators/cluster/dht/src/dht-shared.c b/xlators/cluster/dht/src/dht-shared.c index 0a7aa15e242..d258d26d156 100644 --- a/xlators/cluster/dht/src/dht-shared.c +++ b/xlators/cluster/dht/src/dht-shared.c @@ -9,7 +9,7 @@ */ /* TODO: add NS locking */ -#include "statedump.h" +#include #include "dht-common.h" #include "dht-messages.h" diff --git a/xlators/cluster/dht/src/dht.c b/xlators/cluster/dht/src/dht.c index 63ab926ca58..934eace1ad1 100644 --- a/xlators/cluster/dht/src/dht.c +++ b/xlators/cluster/dht/src/dht.c @@ -8,7 +8,7 @@ cases as published by the Free Software Foundation. */ -#include "statedump.h" +#include #include "dht-common.h" struct xlator_fops dht_pt_fops = { diff --git a/xlators/cluster/dht/src/tier-common.c b/xlators/cluster/dht/src/tier-common.c index b86ed673042..b22f4776ada 100644 --- a/xlators/cluster/dht/src/tier-common.c +++ b/xlators/cluster/dht/src/tier-common.c @@ -8,11 +8,11 @@ cases as published by the Free Software Foundation. */ -#include "glusterfs.h" -#include "xlator.h" +#include +#include #include "libxlator.h" #include "dht-common.h" -#include "defaults.h" +#include #include "tier-common.h" #include "tier.h" diff --git a/xlators/cluster/dht/src/tier.c b/xlators/cluster/dht/src/tier.c index 584f1dd76ba..a8cccaf019e 100644 --- a/xlators/cluster/dht/src/tier.c +++ b/xlators/cluster/dht/src/tier.c @@ -13,8 +13,8 @@ #include "dht-common.h" #include "tier.h" #include "tier-common.h" -#include "syscall.h" -#include "events.h" +#include +#include #include "tier-ctr-interface.h" /*Hard coded DB info*/ diff --git a/xlators/cluster/dht/src/tier.h b/xlators/cluster/dht/src/tier.h index f0ffdfcd769..a20b1db07e0 100644 --- a/xlators/cluster/dht/src/tier.h +++ b/xlators/cluster/dht/src/tier.h @@ -14,7 +14,7 @@ /******************************************************************************/ /* This is from dht-rebalancer.c as we don't have dht-rebalancer.h */ #include "dht-common.h" -#include "xlator.h" +#include #include #include #include diff --git a/xlators/cluster/dht/src/unittest/dht_layout_mock.c b/xlators/cluster/dht/src/unittest/dht_layout_mock.c index 49bf18b9fe6..771452963d1 100644 --- a/xlators/cluster/dht/src/unittest/dht_layout_mock.c +++ b/xlators/cluster/dht/src/unittest/dht_layout_mock.c @@ -7,10 +7,10 @@ later), or the GNU General Public License, version 2 (GPLv2), in all cases as published by the Free Software Foundation. */ -#include "glusterfs.h" -#include "xlator.h" +#include +#include #include "dht-common.h" -#include "byte-order.h" +#include int dht_hash_compute(xlator_t *this, int type, const char *name, uint32_t *hash_p) diff --git a/xlators/cluster/dht/src/unittest/dht_layout_unittest.c b/xlators/cluster/dht/src/unittest/dht_layout_unittest.c index 72890070835..c94a1d0a2e1 100644 --- a/xlators/cluster/dht/src/unittest/dht_layout_unittest.c +++ b/xlators/cluster/dht/src/unittest/dht_layout_unittest.c @@ -9,8 +9,8 @@ */ #include "dht-common.h" -#include "logging.h" -#include "xlator.h" +#include +#include #include #include -- cgit