* [PATCH 00/11] xfsprogs: remove unneeded #includes
@ 2019-06-20 21:29 Eric Sandeen
2019-06-20 21:29 ` [PATCH 01/11] xfs_estimate: remove unneeded includes Eric Sandeen
` (12 more replies)
0 siblings, 13 replies; 17+ messages in thread
From: Eric Sandeen @ 2019-06-20 21:29 UTC (permalink / raw)
To: linux-xfs
This is the result of a mechanical process and ... may have a few
oddities, for example removing "init.h" from some utils made me
realize that we inherit it from libxfs and also have it in local
headers; libxfs has a global but so does scrub, etc. So that stuff
can/should be fixed up, but in the meantime, this zaps out a ton
of header dependencies, and seems worthwhile.
I'll try to do the same thing for the kernel and hold off on
committing the libxfs/* patch here until I can "merge" it in.
-Eric
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 01/11] xfs_estimate: remove unneeded includes
2019-06-20 21:29 [PATCH 00/11] xfsprogs: remove unneeded #includes Eric Sandeen
@ 2019-06-20 21:29 ` Eric Sandeen
2019-06-25 11:01 ` Christoph Hellwig
2019-06-20 21:29 ` [PATCH 02/11] xfs_fsr: " Eric Sandeen
` (11 subsequent siblings)
12 siblings, 1 reply; 17+ messages in thread
From: Eric Sandeen @ 2019-06-20 21:29 UTC (permalink / raw)
To: linux-xfs
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
estimate/xfs_estimate.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/estimate/xfs_estimate.c b/estimate/xfs_estimate.c
index 9e01cce..189bb6c 100644
--- a/estimate/xfs_estimate.c
+++ b/estimate/xfs_estimate.c
@@ -10,7 +10,6 @@
* XXX: assumes dirv1 format.
*/
#include "libxfs.h"
-#include <sys/stat.h>
#include <ftw.h>
static unsigned long long
--
1.8.3.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 02/11] xfs_fsr: remove unneeded includes
2019-06-20 21:29 [PATCH 00/11] xfsprogs: remove unneeded #includes Eric Sandeen
2019-06-20 21:29 ` [PATCH 01/11] xfs_estimate: remove unneeded includes Eric Sandeen
@ 2019-06-20 21:29 ` Eric Sandeen
2019-06-20 21:29 ` [PATCH 03/11] xfs_io: " Eric Sandeen
` (10 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Eric Sandeen @ 2019-06-20 21:29 UTC (permalink / raw)
To: linux-xfs
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
fsr/xfs_fsr.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/fsr/xfs_fsr.c b/fsr/xfs_fsr.c
index fef6262..c6c1f1f 100644
--- a/fsr/xfs_fsr.c
+++ b/fsr/xfs_fsr.c
@@ -5,22 +5,15 @@
*/
#include "libxfs.h"
-#include "xfs.h"
-#include "xfs_types.h"
#include "jdm.h"
-#include "xfs_bmap_btree.h"
-#include "xfs_attr_sf.h"
#include "path.h"
#include <fcntl.h>
-#include <errno.h>
#include <syslog.h>
#include <signal.h>
-#include <sys/ioctl.h>
#include <sys/wait.h>
#include <sys/statvfs.h>
#include <sys/xattr.h>
-#include <paths.h>
#define _PATH_FSRLAST "/var/tmp/.fsrlast_xfs"
#define _PATH_PROC_MOUNTS "/proc/mounts"
--
1.8.3.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 03/11] xfs_io: remove unneeded includes
2019-06-20 21:29 [PATCH 00/11] xfsprogs: remove unneeded #includes Eric Sandeen
2019-06-20 21:29 ` [PATCH 01/11] xfs_estimate: remove unneeded includes Eric Sandeen
2019-06-20 21:29 ` [PATCH 02/11] xfs_fsr: " Eric Sandeen
@ 2019-06-20 21:29 ` Eric Sandeen
2019-06-20 21:29 ` [PATCH 04/11] libfrog: " Eric Sandeen
` (9 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Eric Sandeen @ 2019-06-20 21:29 UTC (permalink / raw)
To: linux-xfs
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
io/bmap.c | 1 -
io/copy_file_range.c | 2 --
io/cowextsize.c | 1 -
io/encrypt.c | 1 -
io/fiemap.c | 1 -
io/file.c | 1 -
io/fsmap.c | 1 -
io/getrusage.c | 1 -
io/init.c | 2 --
io/label.c | 3 ---
io/log_writes.c | 1 -
io/mmap.c | 1 -
io/parent.c | 1 -
io/reflink.c | 2 --
io/scrub.c | 3 ---
io/stat.c | 2 --
16 files changed, 24 deletions(-)
diff --git a/io/bmap.c b/io/bmap.c
index d408826..a0dd77f 100644
--- a/io/bmap.c
+++ b/io/bmap.c
@@ -4,7 +4,6 @@
* All Rights Reserved.
*/
-#include "platform_defs.h"
#include "command.h"
#include "input.h"
#include "init.h"
diff --git a/io/copy_file_range.c b/io/copy_file_range.c
index d069e5b..576a58d 100644
--- a/io/copy_file_range.c
+++ b/io/copy_file_range.c
@@ -4,8 +4,6 @@
*/
#include <sys/syscall.h>
-#include <sys/uio.h>
-#include <xfs/xfs.h>
#include "command.h"
#include "input.h"
#include "init.h"
diff --git a/io/cowextsize.c b/io/cowextsize.c
index 029605a..bbec335 100644
--- a/io/cowextsize.c
+++ b/io/cowextsize.c
@@ -14,7 +14,6 @@
#include "init.h"
#include "io.h"
#include "input.h"
-#include "path.h"
static cmdinfo_t cowextsize_cmd;
static long cowextsize;
diff --git a/io/encrypt.c b/io/encrypt.c
index 8db3525..4c2ba87 100644
--- a/io/encrypt.c
+++ b/io/encrypt.c
@@ -7,7 +7,6 @@
#include "platform_defs.h"
#include "command.h"
#include "init.h"
-#include "path.h"
#include "io.h"
#ifndef ARRAY_SIZE
diff --git a/io/fiemap.c b/io/fiemap.c
index 485bae1..3bda112 100644
--- a/io/fiemap.c
+++ b/io/fiemap.c
@@ -4,7 +4,6 @@
* All Rights Reserved.
*/
-#include "platform_defs.h"
#include "command.h"
#include "input.h"
#include <linux/fiemap.h>
diff --git a/io/file.c b/io/file.c
index c45486e..0ccf803 100644
--- a/io/file.c
+++ b/io/file.c
@@ -6,7 +6,6 @@
#include "command.h"
#include "input.h"
-#include <sys/mman.h>
#include "init.h"
#include "io.h"
diff --git a/io/fsmap.c b/io/fsmap.c
index 477c36f..906d60f 100644
--- a/io/fsmap.c
+++ b/io/fsmap.c
@@ -6,7 +6,6 @@
#include "platform_defs.h"
#include "command.h"
#include "init.h"
-#include "path.h"
#include "io.h"
#include "input.h"
diff --git a/io/getrusage.c b/io/getrusage.c
index 6962913..ba704b7 100644
--- a/io/getrusage.c
+++ b/io/getrusage.c
@@ -9,7 +9,6 @@
#include <sys/time.h>
#include <sys/resource.h>
#include "init.h"
-#include "io.h"
static cmdinfo_t getrusage_cmd;
diff --git a/io/init.c b/io/init.c
index 7025aea..4354c64 100644
--- a/io/init.c
+++ b/io/init.c
@@ -5,9 +5,7 @@
*/
#include <pthread.h>
-#include "platform_defs.h"
#include "command.h"
-#include "input.h"
#include "init.h"
#include "io.h"
diff --git a/io/label.c b/io/label.c
index 72e0796..5180743 100644
--- a/io/label.c
+++ b/io/label.c
@@ -3,10 +3,7 @@
* Copyright (c) 2018 Red Hat, Inc. All Rights Reserved.
*/
-#include <sys/ioctl.h>
#include "platform_defs.h"
-#include "libxfs.h"
-#include "path.h"
#include "command.h"
#include "init.h"
#include "io.h"
diff --git a/io/log_writes.c b/io/log_writes.c
index 9c2285f..114f818 100644
--- a/io/log_writes.c
+++ b/io/log_writes.c
@@ -8,7 +8,6 @@
#include <libdevmapper.h>
#include "command.h"
#include "init.h"
-#include "io.h"
static cmdinfo_t log_writes_cmd;
diff --git a/io/mmap.c b/io/mmap.c
index f9383e5..55b253f 100644
--- a/io/mmap.c
+++ b/io/mmap.c
@@ -7,7 +7,6 @@
#include "command.h"
#include "input.h"
#include <sys/mman.h>
-#include <signal.h>
#include "init.h"
#include "io.h"
diff --git a/io/parent.c b/io/parent.c
index ffa55f6..3db75d6 100644
--- a/io/parent.c
+++ b/io/parent.c
@@ -6,7 +6,6 @@
#include "command.h"
#include "input.h"
-#include "path.h"
#include "parent.h"
#include "handle.h"
#include "jdm.h"
diff --git a/io/reflink.c b/io/reflink.c
index 26eb2e3..815597b 100644
--- a/io/reflink.c
+++ b/io/reflink.c
@@ -4,8 +4,6 @@
* All Rights Reserved.
*/
-#include <sys/uio.h>
-#include <xfs/xfs.h>
#include "command.h"
#include "input.h"
#include "init.h"
diff --git a/io/scrub.c b/io/scrub.c
index 2ff1a6a..449e39f 100644
--- a/io/scrub.c
+++ b/io/scrub.c
@@ -5,11 +5,8 @@
*/
#include <sys/uio.h>
-#include <xfs/xfs.h>
#include "command.h"
-#include "input.h"
#include "init.h"
-#include "path.h"
#include "io.h"
static struct cmdinfo scrub_cmd;
diff --git a/io/stat.c b/io/stat.c
index 37c0b2e..fe51aed 100644
--- a/io/stat.c
+++ b/io/stat.c
@@ -11,9 +11,7 @@
#include "init.h"
#include "io.h"
#include "statx.h"
-#include "libxfs.h"
-#include <fcntl.h>
static cmdinfo_t stat_cmd;
static cmdinfo_t statfs_cmd;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 04/11] libfrog: remove unneeded includes
2019-06-20 21:29 [PATCH 00/11] xfsprogs: remove unneeded #includes Eric Sandeen
` (2 preceding siblings ...)
2019-06-20 21:29 ` [PATCH 03/11] xfs_io: " Eric Sandeen
@ 2019-06-20 21:29 ` Eric Sandeen
2019-06-20 21:29 ` [PATCH 05/11] libxcmd: " Eric Sandeen
` (8 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Eric Sandeen @ 2019-06-20 21:29 UTC (permalink / raw)
To: linux-xfs
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
libfrog/avl64.c | 1 -
libfrog/bitmap.c | 2 --
libfrog/convert.c | 2 --
libfrog/crc32.c | 1 -
libfrog/fsgeom.c | 1 -
libfrog/linux.c | 4 ----
libfrog/list_sort.c | 1 -
libfrog/paths.c | 4 ----
libfrog/projects.c | 1 -
libfrog/ptvar.c | 3 ---
libfrog/radix-tree.c | 3 ---
libfrog/topology.c | 1 -
libfrog/util.c | 1 -
libfrog/workqueue.c | 1 -
14 files changed, 26 deletions(-)
diff --git a/libfrog/avl64.c b/libfrog/avl64.c
index 2547bf3..2147b35 100644
--- a/libfrog/avl64.c
+++ b/libfrog/avl64.c
@@ -3,7 +3,6 @@
* Copyright (c) 2000-2002,2005 Silicon Graphics, Inc.
* All Rights Reserved.
*/
-#include <stdint.h>
#include <stdio.h>
#include "platform_defs.h"
#include "avl64.h"
diff --git a/libfrog/bitmap.c b/libfrog/bitmap.c
index 4dafc4c..5a4a1f7 100644
--- a/libfrog/bitmap.c
+++ b/libfrog/bitmap.c
@@ -4,11 +4,9 @@
* Author: Darrick J. Wong <darrick.wong@oracle.com>
*/
#include "xfs.h"
-#include <stdint.h>
#include <stdlib.h>
#include <assert.h>
#include <pthread.h>
-#include "platform_defs.h"
#include "avl64.h"
#include "list.h"
#include "bitmap.h"
diff --git a/libfrog/convert.c b/libfrog/convert.c
index ed4cae7..f97c62a 100644
--- a/libfrog/convert.c
+++ b/libfrog/convert.c
@@ -3,10 +3,8 @@
* Copyright (c) 2003-2005 Silicon Graphics, Inc.
* All Rights Reserved.
*/
-#include "platform_defs.h"
#include "input.h"
#include <ctype.h>
-#include <stdbool.h>
size_t
numlen(
diff --git a/libfrog/crc32.c b/libfrog/crc32.c
index 526ce95..b4c18c7 100644
--- a/libfrog/crc32.c
+++ b/libfrog/crc32.c
@@ -36,7 +36,6 @@
/* For endian conversion routines */
#include "xfs_arch.h"
#include "crc32defs.h"
-#include "crc32c.h"
/* types specifc to this file */
typedef __u8 u8;
diff --git a/libfrog/fsgeom.c b/libfrog/fsgeom.c
index 8879d16..9a2aee7 100644
--- a/libfrog/fsgeom.c
+++ b/libfrog/fsgeom.c
@@ -3,7 +3,6 @@
* Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved.
*/
#include "libxfs.h"
-#include "fsgeom.h"
void
xfs_report_geom(
diff --git a/libfrog/linux.c b/libfrog/linux.c
index b6c2487..5fc7c6a 100644
--- a/libfrog/linux.c
+++ b/libfrog/linux.c
@@ -4,14 +4,10 @@
* All Rights Reserved.
*/
-#include <mntent.h>
#include <sys/stat.h>
-#include <sys/ioctl.h>
#include <sys/sysinfo.h>
#include "libxfs_priv.h"
-#include "xfs_fs.h"
-#include "init.h"
extern char *progname;
static int max_block_alignment;
diff --git a/libfrog/list_sort.c b/libfrog/list_sort.c
index b77eece..e017b8c 100644
--- a/libfrog/list_sort.c
+++ b/libfrog/list_sort.c
@@ -1,5 +1,4 @@
/* List sorting code from Linux::lib/list_sort.c. */
-#include <stdlib.h>
#include <string.h>
#include "list.h"
diff --git a/libfrog/paths.c b/libfrog/paths.c
index 6e26665..7cda1f8 100644
--- a/libfrog/paths.c
+++ b/libfrog/paths.c
@@ -4,8 +4,6 @@
* All Rights Reserved.
*/
-#include <paths.h>
-#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -14,8 +12,6 @@
#include <sys/stat.h>
#include "path.h"
#include "input.h"
-#include "project.h"
-#include <limits.h>
extern char *progname;
diff --git a/libfrog/projects.c b/libfrog/projects.c
index 91bc78f..ec28c04 100644
--- a/libfrog/projects.c
+++ b/libfrog/projects.c
@@ -5,7 +5,6 @@
*/
#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
#include "project.h"
diff --git a/libfrog/ptvar.c b/libfrog/ptvar.c
index c929683..c8393cc 100644
--- a/libfrog/ptvar.c
+++ b/libfrog/ptvar.c
@@ -3,14 +3,11 @@
* Copyright (C) 2018 Oracle. All Rights Reserved.
* Author: Darrick J. Wong <darrick.wong@oracle.com>
*/
-#include <stdint.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <assert.h>
#include <pthread.h>
-#include <unistd.h>
-#include "platform_defs.h"
#include "ptvar.h"
/*
diff --git a/libfrog/radix-tree.c b/libfrog/radix-tree.c
index c1c7487..de7c588 100644
--- a/libfrog/radix-tree.c
+++ b/libfrog/radix-tree.c
@@ -5,9 +5,6 @@
* Copyright (C) 2005 SGI, Christoph Lameter <clameter@sgi.com>
*/
#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <stdint.h>
#include "platform_defs.h"
#include "radix-tree.h"
diff --git a/libfrog/topology.c b/libfrog/topology.c
index cac164f..b675641 100644
--- a/libfrog/topology.c
+++ b/libfrog/topology.c
@@ -4,7 +4,6 @@
* All Rights Reserved.
*/
-#include "libxfs.h"
#include "libxcmd.h"
#ifdef ENABLE_BLKID
# include <blkid/blkid.h>
diff --git a/libfrog/util.c b/libfrog/util.c
index ff93518..a3971aa 100644
--- a/libfrog/util.c
+++ b/libfrog/util.c
@@ -4,7 +4,6 @@
* All Rights Reserved.
*/
#include "platform_defs.h"
-#include "libfrog.h"
/*
* libfrog is a collection of miscellaneous userspace utilities.
diff --git a/libfrog/workqueue.c b/libfrog/workqueue.c
index 7311477..965ac31 100644
--- a/libfrog/workqueue.c
+++ b/libfrog/workqueue.c
@@ -4,7 +4,6 @@
* Author: Darrick J. Wong <darrick.wong@oracle.com>
*/
#include <pthread.h>
-#include <signal.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
--
1.8.3.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 05/11] libxcmd: remove unneeded includes
2019-06-20 21:29 [PATCH 00/11] xfsprogs: remove unneeded #includes Eric Sandeen
` (3 preceding siblings ...)
2019-06-20 21:29 ` [PATCH 04/11] libfrog: " Eric Sandeen
@ 2019-06-20 21:29 ` Eric Sandeen
2019-06-20 21:29 ` [PATCH 06/11] libxfs: " Eric Sandeen
` (7 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Eric Sandeen @ 2019-06-20 21:29 UTC (permalink / raw)
To: linux-xfs
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
libxcmd/command.c | 1 -
libxcmd/help.c | 1 -
libxcmd/input.c | 2 --
libxcmd/quit.c | 1 -
4 files changed, 5 deletions(-)
diff --git a/libxcmd/command.c b/libxcmd/command.c
index a76d151..9cb90ec 100644
--- a/libxcmd/command.c
+++ b/libxcmd/command.c
@@ -4,7 +4,6 @@
* All Rights Reserved.
*/
-#include "platform_defs.h"
#include "command.h"
#include "input.h"
diff --git a/libxcmd/help.c b/libxcmd/help.c
index b7e0207..16a114d 100644
--- a/libxcmd/help.c
+++ b/libxcmd/help.c
@@ -6,7 +6,6 @@
#include "platform_defs.h"
#include "command.h"
-#include "../quota/init.h"
static cmdinfo_t help_cmd;
static void help_onecmd(const char *cmd, const cmdinfo_t *ct);
diff --git a/libxcmd/input.c b/libxcmd/input.c
index d232d4f..d058f2a 100644
--- a/libxcmd/input.c
+++ b/libxcmd/input.c
@@ -4,10 +4,8 @@
* All Rights Reserved.
*/
-#include "platform_defs.h"
#include "input.h"
#include <ctype.h>
-#include <stdbool.h>
#if defined(ENABLE_READLINE)
# include <readline/history.h>
diff --git a/libxcmd/quit.c b/libxcmd/quit.c
index 7c2d04f..4014980 100644
--- a/libxcmd/quit.c
+++ b/libxcmd/quit.c
@@ -6,7 +6,6 @@
#include "platform_defs.h"
#include "command.h"
-#include "../quota/init.h"
static cmdinfo_t quit_cmd;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 06/11] libxfs: remove unneeded includes
2019-06-20 21:29 [PATCH 00/11] xfsprogs: remove unneeded #includes Eric Sandeen
` (4 preceding siblings ...)
2019-06-20 21:29 ` [PATCH 05/11] libxcmd: " Eric Sandeen
@ 2019-06-20 21:29 ` Eric Sandeen
2019-06-20 21:29 ` [PATCH 07/11] xfs_logprint: " Eric Sandeen
` (6 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Eric Sandeen @ 2019-06-20 21:29 UTC (permalink / raw)
To: linux-xfs
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
libxfs/cache.c | 7 -------
libxfs/defer_item.c | 3 ---
libxfs/init.c | 13 -------------
libxfs/logitem.c | 4 ----
libxfs/rdwr.c | 10 ----------
libxfs/trans.c | 3 ---
libxfs/util.c | 22 ----------------------
libxfs/xfs_ag.c | 2 --
libxfs/xfs_ag_resv.c | 12 ------------
libxfs/xfs_alloc.c | 5 -----
libxfs/xfs_alloc_btree.c | 5 -----
libxfs/xfs_attr.c | 3 ---
libxfs/xfs_attr_leaf.c | 5 -----
libxfs/xfs_attr_remote.c | 7 -------
libxfs/xfs_bit.c | 1 -
libxfs/xfs_bmap.c | 4 ----
libxfs/xfs_bmap_btree.c | 3 ---
libxfs/xfs_btree.c | 6 ------
libxfs/xfs_da_btree.c | 5 -----
libxfs/xfs_da_format.c | 5 -----
libxfs/xfs_defer.c | 7 -------
libxfs/xfs_dir2.c | 6 ------
libxfs/xfs_dir2_block.c | 4 ----
libxfs/xfs_dir2_data.c | 5 -----
libxfs/xfs_dir2_leaf.c | 4 ----
libxfs/xfs_dir2_node.c | 4 ----
libxfs/xfs_dir2_sf.c | 3 ---
libxfs/xfs_dquot_buf.c | 7 -------
libxfs/xfs_ialloc.c | 4 ----
libxfs/xfs_ialloc_btree.c | 4 ----
libxfs/xfs_iext_tree.c | 4 ----
libxfs/xfs_inode_buf.c | 5 -----
libxfs/xfs_inode_fork.c | 2 --
libxfs/xfs_log_rlimit.c | 3 ---
libxfs/xfs_refcount.c | 5 -----
libxfs/xfs_refcount_btree.c | 5 -----
libxfs/xfs_rmap.c | 9 ---------
libxfs/xfs_rmap_btree.c | 6 ------
libxfs/xfs_rtbitmap.c | 5 -----
libxfs/xfs_sb.c | 7 -------
libxfs/xfs_symlink_remote.c | 4 ----
libxfs/xfs_trans_inode.c | 4 ----
libxfs/xfs_trans_resv.c | 4 ----
libxfs/xfs_types.c | 11 -----------
44 files changed, 247 deletions(-)
diff --git a/libxfs/cache.c b/libxfs/cache.c
index 139c7c1..b38bead 100644
--- a/libxfs/cache.c
+++ b/libxfs/cache.c
@@ -6,16 +6,9 @@
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
#include <pthread.h>
#include "libxfs_priv.h"
-#include "xfs_fs.h"
-#include "xfs_shared.h"
-#include "xfs_format.h"
-#include "xfs_trans_resv.h"
-#include "xfs_mount.h"
#include "xfs_bit.h"
#define CACHE_DEBUG 1
diff --git a/libxfs/defer_item.c b/libxfs/defer_item.c
index 2ebc12b..6b4e1dc 100644
--- a/libxfs/defer_item.c
+++ b/libxfs/defer_item.c
@@ -4,13 +4,10 @@
* Author: Darrick J. Wong <darrick.wong@oracle.com>
*/
#include "libxfs_priv.h"
-#include "xfs_fs.h"
-#include "xfs_shared.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
#include "xfs_trans_resv.h"
#include "xfs_bit.h"
-#include "xfs_sb.h"
#include "xfs_mount.h"
#include "xfs_defer.h"
#include "xfs_trans.h"
diff --git a/libxfs/init.c b/libxfs/init.c
index 1baccb3..96e0b94 100644
--- a/libxfs/init.c
+++ b/libxfs/init.c
@@ -8,19 +8,6 @@
#include "init.h"
#include "libxfs_priv.h"
-#include "xfs_fs.h"
-#include "xfs_shared.h"
-#include "xfs_format.h"
-#include "xfs_log_format.h"
-#include "xfs_trans_resv.h"
-#include "xfs_mount.h"
-#include "xfs_defer.h"
-#include "xfs_inode_buf.h"
-#include "xfs_inode_fork.h"
-#include "xfs_inode.h"
-#include "xfs_trans.h"
-#include "xfs_rmap_btree.h"
-#include "xfs_refcount_btree.h"
#include "libxfs.h" /* for now */
diff --git a/libxfs/logitem.c b/libxfs/logitem.c
index 14c62f6..e7f368f 100644
--- a/libxfs/logitem.c
+++ b/libxfs/logitem.c
@@ -5,14 +5,10 @@
*/
#include "libxfs_priv.h"
-#include "xfs_fs.h"
-#include "xfs_shared.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
#include "xfs_trans_resv.h"
#include "xfs_mount.h"
-#include "xfs_inode_buf.h"
-#include "xfs_inode_fork.h"
#include "xfs_inode.h"
#include "xfs_trans.h"
diff --git a/libxfs/rdwr.c b/libxfs/rdwr.c
index e3ff584..7da7d3c 100644
--- a/libxfs/rdwr.c
+++ b/libxfs/rdwr.c
@@ -7,16 +7,6 @@
#include "libxfs_priv.h"
#include "init.h"
-#include "xfs_fs.h"
-#include "xfs_shared.h"
-#include "xfs_format.h"
-#include "xfs_log_format.h"
-#include "xfs_trans_resv.h"
-#include "xfs_mount.h"
-#include "xfs_inode_buf.h"
-#include "xfs_inode_fork.h"
-#include "xfs_inode.h"
-#include "xfs_trans.h"
#include "libxfs.h" /* for LIBXFS_EXIT_ON_FAILURE */
diff --git a/libxfs/trans.c b/libxfs/trans.c
index 5c56b4f..0ed55f8 100644
--- a/libxfs/trans.c
+++ b/libxfs/trans.c
@@ -6,14 +6,11 @@
*/
#include "libxfs_priv.h"
-#include "xfs_fs.h"
#include "xfs_shared.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
#include "xfs_trans_resv.h"
#include "xfs_mount.h"
-#include "xfs_inode_buf.h"
-#include "xfs_inode_fork.h"
#include "xfs_inode.h"
#include "xfs_trans.h"
#include "xfs_sb.h"
diff --git a/libxfs/util.c b/libxfs/util.c
index 171a172..853b328 100644
--- a/libxfs/util.c
+++ b/libxfs/util.c
@@ -6,28 +6,6 @@
#include "libxfs_priv.h"
#include "libxfs.h"
-#include "libxfs_io.h"
-#include "init.h"
-#include "xfs_fs.h"
-#include "xfs_shared.h"
-#include "xfs_format.h"
-#include "xfs_log_format.h"
-#include "xfs_trans_resv.h"
-#include "xfs_mount.h"
-#include "xfs_defer.h"
-#include "xfs_inode_buf.h"
-#include "xfs_inode_fork.h"
-#include "xfs_inode.h"
-#include "xfs_trans.h"
-#include "xfs_bmap.h"
-#include "xfs_bmap_btree.h"
-#include "xfs_trans_space.h"
-#include "xfs_ialloc.h"
-#include "xfs_alloc.h"
-#include "xfs_bit.h"
-#include "xfs_da_format.h"
-#include "xfs_da_btree.h"
-#include "xfs_dir2_priv.h"
/*
* Calculate the worst case log unit reservation for a given superblock
diff --git a/libxfs/xfs_ag.c b/libxfs/xfs_ag.c
index 014e2ad..77a070a 100644
--- a/libxfs/xfs_ag.c
+++ b/libxfs/xfs_ag.c
@@ -6,8 +6,6 @@
*/
#include "libxfs_priv.h"
-#include "xfs.h"
-#include "xfs_fs.h"
#include "xfs_shared.h"
#include "xfs_format.h"
#include "xfs_trans_resv.h"
diff --git a/libxfs/xfs_ag_resv.c b/libxfs/xfs_ag_resv.c
index 6242918..4aa95aa 100644
--- a/libxfs/xfs_ag_resv.c
+++ b/libxfs/xfs_ag_resv.c
@@ -4,24 +4,12 @@
* Author: Darrick J. Wong <darrick.wong@oracle.com>
*/
#include "libxfs_priv.h"
-#include "xfs_fs.h"
#include "xfs_shared.h"
#include "xfs_format.h"
-#include "xfs_log_format.h"
#include "xfs_trans_resv.h"
-#include "xfs_sb.h"
#include "xfs_mount.h"
-#include "xfs_defer.h"
#include "xfs_alloc.h"
-#include "xfs_errortag.h"
#include "xfs_trace.h"
-#include "xfs_cksum.h"
-#include "xfs_trans.h"
-#include "xfs_bit.h"
-#include "xfs_bmap.h"
-#include "xfs_bmap_btree.h"
-#include "xfs_ag_resv.h"
-#include "xfs_trans_space.h"
#include "xfs_rmap_btree.h"
#include "xfs_btree.h"
#include "xfs_refcount_btree.h"
diff --git a/libxfs/xfs_alloc.c b/libxfs/xfs_alloc.c
index 7c2f2d7..adec16b 100644
--- a/libxfs/xfs_alloc.c
+++ b/libxfs/xfs_alloc.c
@@ -4,22 +4,17 @@
* All Rights Reserved.
*/
#include "libxfs_priv.h"
-#include "xfs_fs.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
-#include "xfs_shared.h"
#include "xfs_trans_resv.h"
#include "xfs_bit.h"
#include "xfs_sb.h"
#include "xfs_mount.h"
#include "xfs_defer.h"
-#include "xfs_inode.h"
#include "xfs_btree.h"
#include "xfs_rmap.h"
#include "xfs_alloc_btree.h"
#include "xfs_alloc.h"
-#include "xfs_errortag.h"
-#include "xfs_cksum.h"
#include "xfs_trace.h"
#include "xfs_trans.h"
#include "xfs_ag_resv.h"
diff --git a/libxfs/xfs_alloc_btree.c b/libxfs/xfs_alloc_btree.c
index 5fa3c63..cd1dfdb 100644
--- a/libxfs/xfs_alloc_btree.c
+++ b/libxfs/xfs_alloc_btree.c
@@ -4,10 +4,7 @@
* All Rights Reserved.
*/
#include "libxfs_priv.h"
-#include "xfs_fs.h"
-#include "xfs_shared.h"
#include "xfs_format.h"
-#include "xfs_log_format.h"
#include "xfs_trans_resv.h"
#include "xfs_sb.h"
#include "xfs_mount.h"
@@ -15,8 +12,6 @@
#include "xfs_alloc_btree.h"
#include "xfs_alloc.h"
#include "xfs_trace.h"
-#include "xfs_cksum.h"
-#include "xfs_trans.h"
STATIC struct xfs_btree_cur *
diff --git a/libxfs/xfs_attr.c b/libxfs/xfs_attr.c
index 170e64c..ba51de7 100644
--- a/libxfs/xfs_attr.c
+++ b/libxfs/xfs_attr.c
@@ -4,19 +4,16 @@
* All Rights Reserved.
*/
#include "libxfs_priv.h"
-#include "xfs_fs.h"
#include "xfs_shared.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
#include "xfs_trans_resv.h"
-#include "xfs_bit.h"
#include "xfs_mount.h"
#include "xfs_defer.h"
#include "xfs_da_format.h"
#include "xfs_da_btree.h"
#include "xfs_attr_sf.h"
#include "xfs_inode.h"
-#include "xfs_alloc.h"
#include "xfs_trans.h"
#include "xfs_bmap.h"
#include "xfs_bmap_btree.h"
diff --git a/libxfs/xfs_attr_leaf.c b/libxfs/xfs_attr_leaf.c
index 1027ca0..22a8a3d 100644
--- a/libxfs/xfs_attr_leaf.c
+++ b/libxfs/xfs_attr_leaf.c
@@ -5,16 +5,12 @@
* All Rights Reserved.
*/
#include "libxfs_priv.h"
-#include "xfs_fs.h"
-#include "xfs_shared.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
#include "xfs_trans_resv.h"
-#include "xfs_bit.h"
#include "xfs_sb.h"
#include "xfs_mount.h"
#include "xfs_da_format.h"
-#include "xfs_da_btree.h"
#include "xfs_inode.h"
#include "xfs_trans.h"
#include "xfs_bmap_btree.h"
@@ -24,7 +20,6 @@
#include "xfs_attr.h"
#include "xfs_attr_leaf.h"
#include "xfs_trace.h"
-#include "xfs_cksum.h"
#include "xfs_dir2.h"
diff --git a/libxfs/xfs_attr_remote.c b/libxfs/xfs_attr_remote.c
index 7fe28a0..a2822c1 100644
--- a/libxfs/xfs_attr_remote.c
+++ b/libxfs/xfs_attr_remote.c
@@ -5,8 +5,6 @@
* All Rights Reserved.
*/
#include "libxfs_priv.h"
-#include "xfs_fs.h"
-#include "xfs_shared.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
#include "xfs_trans_resv.h"
@@ -16,14 +14,9 @@
#include "xfs_da_format.h"
#include "xfs_da_btree.h"
#include "xfs_inode.h"
-#include "xfs_alloc.h"
#include "xfs_trans.h"
#include "xfs_bmap.h"
-#include "xfs_attr_leaf.h"
-#include "xfs_attr_remote.h"
-#include "xfs_trans_space.h"
#include "xfs_trace.h"
-#include "xfs_cksum.h"
#define ATTR_RMTVALUE_MAPSIZE 1 /* # of map entries at once */
diff --git a/libxfs/xfs_bit.c b/libxfs/xfs_bit.c
index 3f97fa3..6a76a5a 100644
--- a/libxfs/xfs_bit.c
+++ b/libxfs/xfs_bit.c
@@ -5,7 +5,6 @@
*/
#include "libxfs_priv.h"
#include "xfs_log_format.h"
-#include "xfs_bit.h"
/*
* XFS bit manipulation routines, used in non-realtime code.
diff --git a/libxfs/xfs_bmap.c b/libxfs/xfs_bmap.c
index cd570fb..aae8b08 100644
--- a/libxfs/xfs_bmap.c
+++ b/libxfs/xfs_bmap.c
@@ -4,7 +4,6 @@
* All Rights Reserved.
*/
#include "libxfs_priv.h"
-#include "xfs_fs.h"
#include "xfs_shared.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
@@ -13,8 +12,6 @@
#include "xfs_sb.h"
#include "xfs_mount.h"
#include "xfs_defer.h"
-#include "xfs_da_format.h"
-#include "xfs_da_btree.h"
#include "xfs_dir2.h"
#include "xfs_inode.h"
#include "xfs_btree.h"
@@ -22,7 +19,6 @@
#include "xfs_alloc.h"
#include "xfs_bmap.h"
#include "xfs_bmap_btree.h"
-#include "xfs_errortag.h"
#include "xfs_trans_space.h"
#include "xfs_trace.h"
#include "xfs_attr_leaf.h"
diff --git a/libxfs/xfs_bmap_btree.c b/libxfs/xfs_bmap_btree.c
index b16f901..2a4190b 100644
--- a/libxfs/xfs_bmap_btree.c
+++ b/libxfs/xfs_bmap_btree.c
@@ -4,14 +4,12 @@
* All Rights Reserved.
*/
#include "libxfs_priv.h"
-#include "xfs_fs.h"
#include "xfs_shared.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
#include "xfs_trans_resv.h"
#include "xfs_bit.h"
#include "xfs_mount.h"
-#include "xfs_defer.h"
#include "xfs_inode.h"
#include "xfs_trans.h"
#include "xfs_alloc.h"
@@ -19,7 +17,6 @@
#include "xfs_bmap_btree.h"
#include "xfs_bmap.h"
#include "xfs_trace.h"
-#include "xfs_cksum.h"
#include "xfs_rmap.h"
/*
diff --git a/libxfs/xfs_btree.c b/libxfs/xfs_btree.c
index eb78a9a..f45c39d 100644
--- a/libxfs/xfs_btree.c
+++ b/libxfs/xfs_btree.c
@@ -4,21 +4,15 @@
* All Rights Reserved.
*/
#include "libxfs_priv.h"
-#include "xfs_fs.h"
-#include "xfs_shared.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
#include "xfs_trans_resv.h"
#include "xfs_bit.h"
#include "xfs_mount.h"
-#include "xfs_defer.h"
#include "xfs_inode.h"
#include "xfs_trans.h"
#include "xfs_btree.h"
-#include "xfs_errortag.h"
#include "xfs_trace.h"
-#include "xfs_cksum.h"
-#include "xfs_alloc.h"
/*
* Cursor allocation zone.
diff --git a/libxfs/xfs_da_btree.c b/libxfs/xfs_da_btree.c
index 87b2bc3..91922eb 100644
--- a/libxfs/xfs_da_btree.c
+++ b/libxfs/xfs_da_btree.c
@@ -5,24 +5,19 @@
* All Rights Reserved.
*/
#include "libxfs_priv.h"
-#include "xfs_fs.h"
#include "xfs_shared.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
#include "xfs_trans_resv.h"
#include "xfs_bit.h"
#include "xfs_mount.h"
-#include "xfs_da_format.h"
-#include "xfs_da_btree.h"
#include "xfs_dir2.h"
#include "xfs_dir2_priv.h"
#include "xfs_inode.h"
#include "xfs_trans.h"
-#include "xfs_alloc.h"
#include "xfs_bmap.h"
#include "xfs_attr_leaf.h"
#include "xfs_trace.h"
-#include "xfs_cksum.h"
/*
* xfs_da_btree.c
diff --git a/libxfs/xfs_da_format.c b/libxfs/xfs_da_format.c
index 918bf99..158a8e8 100644
--- a/libxfs/xfs_da_format.c
+++ b/libxfs/xfs_da_format.c
@@ -5,17 +5,12 @@
* All Rights Reserved.
*/
#include "libxfs_priv.h"
-#include "xfs_fs.h"
-#include "xfs_shared.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
#include "xfs_trans_resv.h"
#include "xfs_mount.h"
-#include "xfs_da_format.h"
-#include "xfs_da_btree.h"
#include "xfs_inode.h"
#include "xfs_dir2.h"
-#include "xfs_dir2_priv.h"
/*
* Shortform directory ops
diff --git a/libxfs/xfs_defer.c b/libxfs/xfs_defer.c
index d9d4271..9398d82 100644
--- a/libxfs/xfs_defer.c
+++ b/libxfs/xfs_defer.c
@@ -4,17 +4,10 @@
* Author: Darrick J. Wong <darrick.wong@oracle.com>
*/
#include "libxfs_priv.h"
-#include "xfs_fs.h"
#include "xfs_shared.h"
-#include "xfs_format.h"
#include "xfs_log_format.h"
-#include "xfs_trans_resv.h"
-#include "xfs_bit.h"
-#include "xfs_sb.h"
-#include "xfs_mount.h"
#include "xfs_defer.h"
#include "xfs_trans.h"
-#include "xfs_inode.h"
#include "xfs_trace.h"
/*
diff --git a/libxfs/xfs_dir2.c b/libxfs/xfs_dir2.c
index 6b51a52..cd7621b 100644
--- a/libxfs/xfs_dir2.c
+++ b/libxfs/xfs_dir2.c
@@ -4,21 +4,15 @@
* All Rights Reserved.
*/
#include "libxfs_priv.h"
-#include "xfs_fs.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
#include "xfs_trans_resv.h"
#include "xfs_mount.h"
-#include "xfs_defer.h"
-#include "xfs_da_format.h"
-#include "xfs_da_btree.h"
#include "xfs_inode.h"
#include "xfs_trans.h"
#include "xfs_bmap.h"
#include "xfs_dir2.h"
#include "xfs_dir2_priv.h"
-#include "xfs_ialloc.h"
-#include "xfs_errortag.h"
#include "xfs_trace.h"
struct xfs_name xfs_name_dotdot = { (unsigned char *)"..", 2, XFS_DIR3_FT_DIR };
diff --git a/libxfs/xfs_dir2_block.c b/libxfs/xfs_dir2_block.c
index d13fafa..f7577b7 100644
--- a/libxfs/xfs_dir2_block.c
+++ b/libxfs/xfs_dir2_block.c
@@ -5,20 +5,16 @@
* All Rights Reserved.
*/
#include "libxfs_priv.h"
-#include "xfs_fs.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
#include "xfs_trans_resv.h"
#include "xfs_mount.h"
-#include "xfs_da_format.h"
-#include "xfs_da_btree.h"
#include "xfs_inode.h"
#include "xfs_trans.h"
#include "xfs_bmap.h"
#include "xfs_dir2.h"
#include "xfs_dir2_priv.h"
#include "xfs_trace.h"
-#include "xfs_cksum.h"
/*
* Local function prototypes.
diff --git a/libxfs/xfs_dir2_data.c b/libxfs/xfs_dir2_data.c
index e3d698f..1d1a48a 100644
--- a/libxfs/xfs_dir2_data.c
+++ b/libxfs/xfs_dir2_data.c
@@ -5,18 +5,13 @@
* All Rights Reserved.
*/
#include "libxfs_priv.h"
-#include "xfs_fs.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
#include "xfs_trans_resv.h"
#include "xfs_mount.h"
-#include "xfs_da_format.h"
-#include "xfs_da_btree.h"
#include "xfs_inode.h"
#include "xfs_dir2.h"
-#include "xfs_dir2_priv.h"
#include "xfs_trans.h"
-#include "xfs_cksum.h"
static xfs_failaddr_t xfs_dir2_data_freefind_verify(
struct xfs_dir2_data_hdr *hdr, struct xfs_dir2_data_free *bf,
diff --git a/libxfs/xfs_dir2_leaf.c b/libxfs/xfs_dir2_leaf.c
index 4c3a05a..31f737f 100644
--- a/libxfs/xfs_dir2_leaf.c
+++ b/libxfs/xfs_dir2_leaf.c
@@ -5,20 +5,16 @@
* All Rights Reserved.
*/
#include "libxfs_priv.h"
-#include "xfs_fs.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
#include "xfs_trans_resv.h"
#include "xfs_mount.h"
-#include "xfs_da_format.h"
-#include "xfs_da_btree.h"
#include "xfs_inode.h"
#include "xfs_bmap.h"
#include "xfs_dir2.h"
#include "xfs_dir2_priv.h"
#include "xfs_trace.h"
#include "xfs_trans.h"
-#include "xfs_cksum.h"
/*
* Local function declarations.
diff --git a/libxfs/xfs_dir2_node.c b/libxfs/xfs_dir2_node.c
index 2de174c..4a54dcd 100644
--- a/libxfs/xfs_dir2_node.c
+++ b/libxfs/xfs_dir2_node.c
@@ -5,20 +5,16 @@
* All Rights Reserved.
*/
#include "libxfs_priv.h"
-#include "xfs_fs.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
#include "xfs_trans_resv.h"
#include "xfs_mount.h"
-#include "xfs_da_format.h"
-#include "xfs_da_btree.h"
#include "xfs_inode.h"
#include "xfs_bmap.h"
#include "xfs_dir2.h"
#include "xfs_dir2_priv.h"
#include "xfs_trace.h"
#include "xfs_trans.h"
-#include "xfs_cksum.h"
/*
* Function declarations.
diff --git a/libxfs/xfs_dir2_sf.c b/libxfs/xfs_dir2_sf.c
index 24a0e61..729988a 100644
--- a/libxfs/xfs_dir2_sf.c
+++ b/libxfs/xfs_dir2_sf.c
@@ -4,13 +4,10 @@
* All Rights Reserved.
*/
#include "libxfs_priv.h"
-#include "xfs_fs.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
#include "xfs_trans_resv.h"
#include "xfs_mount.h"
-#include "xfs_da_format.h"
-#include "xfs_da_btree.h"
#include "xfs_inode.h"
#include "xfs_trans.h"
#include "xfs_dir2.h"
diff --git a/libxfs/xfs_dquot_buf.c b/libxfs/xfs_dquot_buf.c
index 8bcae16..a59b230 100644
--- a/libxfs/xfs_dquot_buf.c
+++ b/libxfs/xfs_dquot_buf.c
@@ -5,16 +5,9 @@
* All Rights Reserved.
*/
#include "libxfs_priv.h"
-#include "xfs_fs.h"
-#include "xfs_shared.h"
#include "xfs_format.h"
-#include "xfs_log_format.h"
#include "xfs_trans_resv.h"
#include "xfs_mount.h"
-#include "xfs_inode.h"
-#include "xfs_trans.h"
-#include "xfs_cksum.h"
-#include "xfs_trace.h"
#include "xfs_quota_defs.h"
int
diff --git a/libxfs/xfs_ialloc.c b/libxfs/xfs_ialloc.c
index 0cdf39e..a838839 100644
--- a/libxfs/xfs_ialloc.c
+++ b/libxfs/xfs_ialloc.c
@@ -4,7 +4,6 @@
* All Rights Reserved.
*/
#include "libxfs_priv.h"
-#include "xfs_fs.h"
#include "xfs_shared.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
@@ -12,15 +11,12 @@
#include "xfs_bit.h"
#include "xfs_sb.h"
#include "xfs_mount.h"
-#include "xfs_defer.h"
#include "xfs_inode.h"
#include "xfs_btree.h"
#include "xfs_ialloc.h"
#include "xfs_ialloc_btree.h"
#include "xfs_alloc.h"
-#include "xfs_errortag.h"
#include "xfs_bmap.h"
-#include "xfs_cksum.h"
#include "xfs_trans.h"
#include "xfs_trace.h"
#include "xfs_rmap.h"
diff --git a/libxfs/xfs_ialloc_btree.c b/libxfs/xfs_ialloc_btree.c
index 599c79d..6033419 100644
--- a/libxfs/xfs_ialloc_btree.c
+++ b/libxfs/xfs_ialloc_btree.c
@@ -4,20 +4,16 @@
* All Rights Reserved.
*/
#include "libxfs_priv.h"
-#include "xfs_fs.h"
-#include "xfs_shared.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
#include "xfs_trans_resv.h"
#include "xfs_bit.h"
#include "xfs_mount.h"
-#include "xfs_inode.h"
#include "xfs_btree.h"
#include "xfs_ialloc.h"
#include "xfs_ialloc_btree.h"
#include "xfs_alloc.h"
#include "xfs_trace.h"
-#include "xfs_cksum.h"
#include "xfs_trans.h"
#include "xfs_rmap.h"
diff --git a/libxfs/xfs_iext_tree.c b/libxfs/xfs_iext_tree.c
index 5bfe8f0..b5b168f 100644
--- a/libxfs/xfs_iext_tree.c
+++ b/libxfs/xfs_iext_tree.c
@@ -11,10 +11,6 @@
#include "xfs_bit.h"
#include "xfs_log_format.h"
#include "xfs_inode.h"
-#include "xfs_inode_fork.h"
-#include "xfs_trans_resv.h"
-#include "xfs_mount.h"
-#include "xfs_bmap.h"
#include "xfs_trace.h"
/*
diff --git a/libxfs/xfs_inode_buf.c b/libxfs/xfs_inode_buf.c
index 108e541..7abb71b 100644
--- a/libxfs/xfs_inode_buf.c
+++ b/libxfs/xfs_inode_buf.c
@@ -4,16 +4,11 @@
* All Rights Reserved.
*/
#include "libxfs_priv.h"
-#include "xfs_fs.h"
-#include "xfs_shared.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
#include "xfs_trans_resv.h"
#include "xfs_mount.h"
-#include "xfs_defer.h"
#include "xfs_inode.h"
-#include "xfs_errortag.h"
-#include "xfs_cksum.h"
#include "xfs_trans.h"
#include "xfs_ialloc.h"
#include "xfs_dir2.h"
diff --git a/libxfs/xfs_inode_fork.c b/libxfs/xfs_inode_fork.c
index 4cad396..a502437 100644
--- a/libxfs/xfs_inode_fork.c
+++ b/libxfs/xfs_inode_fork.c
@@ -4,7 +4,6 @@
* All Rights Reserved.
*/
#include "libxfs_priv.h"
-#include "xfs_fs.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
#include "xfs_trans_resv.h"
@@ -15,7 +14,6 @@
#include "xfs_bmap_btree.h"
#include "xfs_bmap.h"
#include "xfs_trace.h"
-#include "xfs_attr_sf.h"
#include "xfs_da_format.h"
#include "xfs_da_btree.h"
#include "xfs_dir2_priv.h"
diff --git a/libxfs/xfs_log_rlimit.c b/libxfs/xfs_log_rlimit.c
index 051c8fd..e21aade 100644
--- a/libxfs/xfs_log_rlimit.c
+++ b/libxfs/xfs_log_rlimit.c
@@ -4,7 +4,6 @@
* All Rights Reserved.
*/
#include "libxfs_priv.h"
-#include "xfs_fs.h"
#include "xfs_shared.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
@@ -12,9 +11,7 @@
#include "xfs_mount.h"
#include "xfs_da_format.h"
#include "xfs_trans_space.h"
-#include "xfs_inode.h"
#include "xfs_da_btree.h"
-#include "xfs_attr_leaf.h"
#include "xfs_bmap_btree.h"
/*
diff --git a/libxfs/xfs_refcount.c b/libxfs/xfs_refcount.c
index 0a517f5..7a3c9f6 100644
--- a/libxfs/xfs_refcount.c
+++ b/libxfs/xfs_refcount.c
@@ -4,21 +4,16 @@
* Author: Darrick J. Wong <darrick.wong@oracle.com>
*/
#include "libxfs_priv.h"
-#include "xfs_fs.h"
-#include "xfs_shared.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
#include "xfs_trans_resv.h"
-#include "xfs_sb.h"
#include "xfs_mount.h"
#include "xfs_defer.h"
#include "xfs_btree.h"
#include "xfs_bmap.h"
#include "xfs_refcount_btree.h"
#include "xfs_alloc.h"
-#include "xfs_errortag.h"
#include "xfs_trace.h"
-#include "xfs_cksum.h"
#include "xfs_trans.h"
#include "xfs_bit.h"
#include "xfs_refcount.h"
diff --git a/libxfs/xfs_refcount_btree.c b/libxfs/xfs_refcount_btree.c
index 65018b1..31ae0cf 100644
--- a/libxfs/xfs_refcount_btree.c
+++ b/libxfs/xfs_refcount_btree.c
@@ -4,21 +4,16 @@
* Author: Darrick J. Wong <darrick.wong@oracle.com>
*/
#include "libxfs_priv.h"
-#include "xfs_fs.h"
-#include "xfs_shared.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
#include "xfs_trans_resv.h"
#include "xfs_sb.h"
#include "xfs_mount.h"
#include "xfs_btree.h"
-#include "xfs_bmap.h"
#include "xfs_refcount_btree.h"
#include "xfs_alloc.h"
#include "xfs_trace.h"
-#include "xfs_cksum.h"
#include "xfs_trans.h"
-#include "xfs_bit.h"
#include "xfs_rmap.h"
static struct xfs_btree_cur *
diff --git a/libxfs/xfs_rmap.c b/libxfs/xfs_rmap.c
index 42938e6..0911d1e 100644
--- a/libxfs/xfs_rmap.c
+++ b/libxfs/xfs_rmap.c
@@ -4,28 +4,19 @@
* All Rights Reserved.
*/
#include "libxfs_priv.h"
-#include "xfs_fs.h"
-#include "xfs_shared.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
#include "xfs_trans_resv.h"
#include "xfs_bit.h"
-#include "xfs_sb.h"
#include "xfs_mount.h"
#include "xfs_defer.h"
-#include "xfs_da_format.h"
-#include "xfs_da_btree.h"
#include "xfs_btree.h"
#include "xfs_trans.h"
#include "xfs_alloc.h"
#include "xfs_rmap.h"
#include "xfs_rmap_btree.h"
-#include "xfs_trans_space.h"
#include "xfs_trace.h"
-#include "xfs_errortag.h"
-#include "xfs_bmap.h"
#include "xfs_inode.h"
-#include "xfs_ialloc.h"
/*
* Lookup the first record less than or equal to [bno, len, owner, offset]
diff --git a/libxfs/xfs_rmap_btree.c b/libxfs/xfs_rmap_btree.c
index 59abe41..3d86395 100644
--- a/libxfs/xfs_rmap_btree.c
+++ b/libxfs/xfs_rmap_btree.c
@@ -4,23 +4,17 @@
* All Rights Reserved.
*/
#include "libxfs_priv.h"
-#include "xfs_fs.h"
-#include "xfs_shared.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
#include "xfs_trans_resv.h"
-#include "xfs_bit.h"
#include "xfs_sb.h"
#include "xfs_mount.h"
-#include "xfs_defer.h"
-#include "xfs_inode.h"
#include "xfs_trans.h"
#include "xfs_alloc.h"
#include "xfs_btree.h"
#include "xfs_rmap.h"
#include "xfs_rmap_btree.h"
#include "xfs_trace.h"
-#include "xfs_cksum.h"
#include "xfs_ag_resv.h"
/*
diff --git a/libxfs/xfs_rtbitmap.c b/libxfs/xfs_rtbitmap.c
index d7cde0d..74553c5 100644
--- a/libxfs/xfs_rtbitmap.c
+++ b/libxfs/xfs_rtbitmap.c
@@ -4,7 +4,6 @@
* All Rights Reserved.
*/
#include "libxfs_priv.h"
-#include "xfs_fs.h"
#include "xfs_shared.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
@@ -13,11 +12,7 @@
#include "xfs_mount.h"
#include "xfs_inode.h"
#include "xfs_bmap.h"
-#include "xfs_bmap_btree.h"
-#include "xfs_alloc.h"
#include "xfs_trans.h"
-#include "xfs_trans_space.h"
-#include "xfs_trace.h"
/*
diff --git a/libxfs/xfs_sb.c b/libxfs/xfs_sb.c
index f1e2ba5..66af5ad 100644
--- a/libxfs/xfs_sb.c
+++ b/libxfs/xfs_sb.c
@@ -4,29 +4,22 @@
* All Rights Reserved.
*/
#include "libxfs_priv.h"
-#include "xfs_fs.h"
#include "xfs_shared.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
#include "xfs_trans_resv.h"
#include "xfs_bit.h"
-#include "xfs_sb.h"
#include "xfs_mount.h"
-#include "xfs_defer.h"
-#include "xfs_inode.h"
#include "xfs_ialloc.h"
#include "xfs_alloc.h"
#include "xfs_trace.h"
-#include "xfs_cksum.h"
#include "xfs_trans.h"
#include "xfs_bmap_btree.h"
#include "xfs_alloc_btree.h"
#include "xfs_ialloc_btree.h"
#include "xfs_rmap_btree.h"
-#include "xfs_bmap.h"
#include "xfs_refcount_btree.h"
#include "xfs_da_format.h"
-#include "xfs_da_btree.h"
/*
* Physical superblock buffer manipulations. Shared with libxfs in userspace.
diff --git a/libxfs/xfs_symlink_remote.c b/libxfs/xfs_symlink_remote.c
index 66de21a..4666a3a 100644
--- a/libxfs/xfs_symlink_remote.c
+++ b/libxfs/xfs_symlink_remote.c
@@ -5,16 +5,12 @@
* All rights reserved.
*/
#include "libxfs_priv.h"
-#include "xfs_fs.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
#include "xfs_shared.h"
#include "xfs_trans_resv.h"
#include "xfs_mount.h"
-#include "xfs_bmap_btree.h"
#include "xfs_inode.h"
-#include "xfs_trace.h"
-#include "xfs_cksum.h"
#include "xfs_trans.h"
diff --git a/libxfs/xfs_trans_inode.c b/libxfs/xfs_trans_inode.c
index 87e6335..1d3b16f 100644
--- a/libxfs/xfs_trans_inode.c
+++ b/libxfs/xfs_trans_inode.c
@@ -4,15 +4,11 @@
* All Rights Reserved.
*/
#include "libxfs_priv.h"
-#include "xfs_fs.h"
#include "xfs_shared.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
-#include "xfs_trans_resv.h"
-#include "xfs_mount.h"
#include "xfs_inode.h"
#include "xfs_trans.h"
-#include "xfs_trace.h"
/*
* Add a locked inode to the transaction.
diff --git a/libxfs/xfs_trans_resv.c b/libxfs/xfs_trans_resv.c
index 4ecf7c2..c73be3e 100644
--- a/libxfs/xfs_trans_resv.c
+++ b/libxfs/xfs_trans_resv.c
@@ -5,7 +5,6 @@
* All Rights Reserved.
*/
#include "libxfs_priv.h"
-#include "xfs_fs.h"
#include "xfs_shared.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
@@ -13,12 +12,9 @@
#include "xfs_mount.h"
#include "xfs_da_format.h"
#include "xfs_da_btree.h"
-#include "xfs_inode.h"
#include "xfs_bmap_btree.h"
-#include "xfs_ialloc.h"
#include "xfs_trans.h"
#include "xfs_trans_space.h"
-#include "xfs_trace.h"
#include "xfs_quota_defs.h"
#define _ALLOC true
diff --git a/libxfs/xfs_types.c b/libxfs/xfs_types.c
index 715d205..cd69f60 100644
--- a/libxfs/xfs_types.c
+++ b/libxfs/xfs_types.c
@@ -5,21 +5,10 @@
* All Rights Reserved.
*/
#include "libxfs_priv.h"
-#include "xfs_fs.h"
#include "xfs_format.h"
-#include "xfs_log_format.h"
-#include "xfs_shared.h"
#include "xfs_trans_resv.h"
#include "xfs_bit.h"
-#include "xfs_sb.h"
#include "xfs_mount.h"
-#include "xfs_defer.h"
-#include "xfs_inode.h"
-#include "xfs_btree.h"
-#include "xfs_rmap.h"
-#include "xfs_alloc_btree.h"
-#include "xfs_alloc.h"
-#include "xfs_ialloc.h"
/* Find the size of the AG, in blocks. */
xfs_agblock_t
--
1.8.3.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 07/11] xfs_logprint: remove unneeded includes
2019-06-20 21:29 [PATCH 00/11] xfsprogs: remove unneeded #includes Eric Sandeen
` (5 preceding siblings ...)
2019-06-20 21:29 ` [PATCH 06/11] libxfs: " Eric Sandeen
@ 2019-06-20 21:29 ` Eric Sandeen
2019-06-20 21:29 ` [PATCH 08/11] xfs_quota: " Eric Sandeen
` (5 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Eric Sandeen @ 2019-06-20 21:29 UTC (permalink / raw)
To: linux-xfs
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
logprint/log_print_trans.c | 1 -
logprint/log_redo.c | 1 -
2 files changed, 2 deletions(-)
diff --git a/logprint/log_print_trans.c b/logprint/log_print_trans.c
index 08e44a3..28c83a9 100644
--- a/logprint/log_print_trans.c
+++ b/logprint/log_print_trans.c
@@ -6,7 +6,6 @@
#include "libxfs.h"
#include "libxlog.h"
-#include "logprint.h"
void
xlog_recover_print_trans_head(
diff --git a/logprint/log_redo.c b/logprint/log_redo.c
index f1f690e..acc7067 100644
--- a/logprint/log_redo.c
+++ b/logprint/log_redo.c
@@ -7,7 +7,6 @@
#include "libxfs.h"
#include "libxlog.h"
-#include "logprint.h"
/* Extent Free Items */
--
1.8.3.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 08/11] xfs_quota: remove unneeded includes
2019-06-20 21:29 [PATCH 00/11] xfsprogs: remove unneeded #includes Eric Sandeen
` (6 preceding siblings ...)
2019-06-20 21:29 ` [PATCH 07/11] xfs_logprint: " Eric Sandeen
@ 2019-06-20 21:29 ` Eric Sandeen
2019-06-20 21:29 ` [PATCH 09/11] xfs_repair: " Eric Sandeen
` (4 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Eric Sandeen @ 2019-06-20 21:29 UTC (permalink / raw)
To: linux-xfs
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
quota/edit.c | 3 ---
quota/quot.c | 3 ---
quota/quota.c | 1 -
quota/report.c | 1 -
quota/util.c | 1 -
5 files changed, 9 deletions(-)
diff --git a/quota/edit.c b/quota/edit.c
index f9938b8..d86503c 100644
--- a/quota/edit.c
+++ b/quota/edit.c
@@ -4,9 +4,6 @@
* All Rights Reserved.
*/
-#include <pwd.h>
-#include <grp.h>
-#include <ctype.h>
#include "input.h"
#include "command.h"
#include "init.h"
diff --git a/quota/quot.c b/quota/quot.c
index d60cf4a..518b266 100644
--- a/quota/quot.c
+++ b/quota/quot.c
@@ -6,9 +6,6 @@
#include <stdbool.h>
#include "command.h"
-#include <ctype.h>
-#include <pwd.h>
-#include <grp.h>
#include "init.h"
#include "quota.h"
diff --git a/quota/quota.c b/quota/quota.c
index 9545cc4..7ef4829 100644
--- a/quota/quota.c
+++ b/quota/quota.c
@@ -6,7 +6,6 @@
#include <stdbool.h>
#include "command.h"
-#include <ctype.h>
#include <pwd.h>
#include <grp.h>
#include "init.h"
diff --git a/quota/report.c b/quota/report.c
index e6def91..2ad12d7 100644
--- a/quota/report.c
+++ b/quota/report.c
@@ -8,7 +8,6 @@
#include <sys/types.h>
#include <pwd.h>
#include <grp.h>
-#include <utmp.h>
#include "init.h"
#include "quota.h"
diff --git a/quota/util.c b/quota/util.c
index 50470ab..4bcdd9d 100644
--- a/quota/util.c
+++ b/quota/util.c
@@ -8,7 +8,6 @@
#include <stdbool.h>
#include <pwd.h>
#include <grp.h>
-#include <utmp.h>
#include "init.h"
#include "quota.h"
--
1.8.3.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 09/11] xfs_repair: remove unneeded includes
2019-06-20 21:29 [PATCH 00/11] xfsprogs: remove unneeded #includes Eric Sandeen
` (7 preceding siblings ...)
2019-06-20 21:29 ` [PATCH 08/11] xfs_quota: " Eric Sandeen
@ 2019-06-20 21:29 ` Eric Sandeen
2019-06-20 21:29 ` [PATCH 10/11] xfs_scrub: " Eric Sandeen
` (3 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Eric Sandeen @ 2019-06-20 21:29 UTC (permalink / raw)
To: linux-xfs
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
repair/agheader.c | 1 -
repair/attr_repair.c | 4 ----
repair/btree.c | 1 -
repair/da_util.c | 1 -
repair/dino_chunks.c | 5 -----
repair/dinode.c | 7 -------
repair/dir2.c | 5 -----
repair/incore.c | 5 -----
repair/incore_bmc.c | 5 -----
repair/incore_ext.c | 5 -----
repair/incore_ino.c | 5 -----
repair/init.c | 6 ------
repair/phase1.c | 2 --
repair/phase2.c | 3 ---
repair/phase3.c | 4 ----
repair/phase4.c | 5 -----
repair/phase5.c | 6 ------
repair/phase6.c | 5 -----
repair/phase7.c | 6 ------
repair/prefetch.c | 9 ---------
repair/progress.c | 1 -
repair/rmap.c | 2 --
repair/rt.c | 6 ------
repair/sb.c | 1 -
repair/scan.c | 3 ---
repair/slab.c | 1 -
repair/threads.c | 3 ---
repair/versions.c | 2 --
repair/xfs_repair.c | 5 -----
29 files changed, 114 deletions(-)
diff --git a/repair/agheader.c b/repair/agheader.c
index 218ee25..069a024 100644
--- a/repair/agheader.c
+++ b/repair/agheader.c
@@ -4,7 +4,6 @@
* All Rights Reserved.
*/
-#include "libxfs.h"
#include "globals.h"
#include "agheader.h"
#include "protos.h"
diff --git a/repair/attr_repair.c b/repair/attr_repair.c
index 9a44f61..b7dff78 100644
--- a/repair/attr_repair.c
+++ b/repair/attr_repair.c
@@ -4,14 +4,10 @@
* All Rights Reserved.
*/
-#include "libxfs.h"
#include "globals.h"
#include "err_protos.h"
#include "attr_repair.h"
-#include "dinode.h"
#include "bmap.h"
-#include "protos.h"
-#include "dir2.h"
#include "da_util.h"
static int xfs_acl_valid(struct xfs_mount *mp, struct xfs_acl *daclp);
diff --git a/repair/btree.c b/repair/btree.c
index 292fa51..fb288b4 100644
--- a/repair/btree.c
+++ b/repair/btree.c
@@ -5,7 +5,6 @@
*/
#include "libxfs.h"
-#include "btree.h"
/*
* Maximum number of keys per node. Must be greater than 2 for the code
diff --git a/repair/da_util.c b/repair/da_util.c
index 8c818ea..b0769d0 100644
--- a/repair/da_util.c
+++ b/repair/da_util.c
@@ -6,7 +6,6 @@
/* Various utilities for repair of directory and attribute metadata */
-#include "libxfs.h"
#include "globals.h"
#include "err_protos.h"
#include "bmap.h"
diff --git a/repair/dino_chunks.c b/repair/dino_chunks.c
index 3b1890b..e521dc1 100644
--- a/repair/dino_chunks.c
+++ b/repair/dino_chunks.c
@@ -4,12 +4,7 @@
* All Rights Reserved.
*/
-#include "libxfs.h"
-#include "avl.h"
#include "globals.h"
-#include "agheader.h"
-#include "incore.h"
-#include "protos.h"
#include "err_protos.h"
#include "dinode.h"
#include "versions.h"
diff --git a/repair/dinode.c b/repair/dinode.c
index c0a56da..769446e 100644
--- a/repair/dinode.c
+++ b/repair/dinode.c
@@ -4,20 +4,13 @@
* All Rights Reserved.
*/
-#include "libxfs.h"
-#include "avl.h"
#include "globals.h"
-#include "agheader.h"
#include "incore.h"
-#include "protos.h"
#include "err_protos.h"
#include "dir2.h"
-#include "dinode.h"
#include "scan.h"
-#include "versions.h"
#include "attr_repair.h"
#include "bmap.h"
-#include "threads.h"
#include "slab.h"
#include "rmap.h"
diff --git a/repair/dir2.c b/repair/dir2.c
index 4ac0084..3fe5600 100644
--- a/repair/dir2.c
+++ b/repair/dir2.c
@@ -4,17 +4,12 @@
* All Rights Reserved.
*/
-#include "libxfs.h"
-#include "avl.h"
#include "globals.h"
#include "incore.h"
#include "err_protos.h"
#include "dinode.h"
-#include "dir2.h"
#include "bmap.h"
#include "da_util.h"
-#include "prefetch.h"
-#include "progress.h"
/*
* Known bad inode list. These are seen when the leaf and node
diff --git a/repair/incore.c b/repair/incore.c
index 1374dde..d3599cf 100644
--- a/repair/incore.c
+++ b/repair/incore.c
@@ -4,15 +4,10 @@
* All Rights Reserved.
*/
-#include "libxfs.h"
-#include "avl.h"
#include "btree.h"
#include "globals.h"
#include "incore.h"
-#include "agheader.h"
-#include "protos.h"
#include "err_protos.h"
-#include "threads.h"
/*
* The following manages the in-core bitmap of the entire filesystem
diff --git a/repair/incore_bmc.c b/repair/incore_bmc.c
index 97be15e..917d35c 100644
--- a/repair/incore_bmc.c
+++ b/repair/incore_bmc.c
@@ -5,12 +5,7 @@
*/
#include "libxfs.h"
-#include "avl.h"
-#include "globals.h"
#include "incore.h"
-#include "agheader.h"
-#include "protos.h"
-#include "err_protos.h"
void
init_bm_cursor(bmap_cursor_t *cursor, int num_levels)
diff --git a/repair/incore_ext.c b/repair/incore_ext.c
index e7ef9eb..918c4ba 100644
--- a/repair/incore_ext.c
+++ b/repair/incore_ext.c
@@ -4,16 +4,11 @@
* All Rights Reserved.
*/
-#include "libxfs.h"
-#include "avl.h"
#include "btree.h"
#include "globals.h"
#include "incore.h"
-#include "agheader.h"
-#include "protos.h"
#include "err_protos.h"
#include "avl64.h"
-#include "threads.h"
/*
* note: there are 4 sets of incore things handled here:
diff --git a/repair/incore_ino.c b/repair/incore_ino.c
index 82956ae..e75d001 100644
--- a/repair/incore_ino.c
+++ b/repair/incore_ino.c
@@ -4,13 +4,8 @@
* All Rights Reserved.
*/
-#include "libxfs.h"
-#include "avl.h"
#include "globals.h"
#include "incore.h"
-#include "agheader.h"
-#include "protos.h"
-#include "threads.h"
#include "err_protos.h"
/*
diff --git a/repair/init.c b/repair/init.c
index 55f226e..60d4884 100644
--- a/repair/init.c
+++ b/repair/init.c
@@ -4,15 +4,9 @@
* All Rights Reserved.
*/
-#include "libxfs.h"
#include "globals.h"
-#include "agheader.h"
-#include "protos.h"
#include "err_protos.h"
-#include "pthread.h"
-#include "avl.h"
#include "bmap.h"
-#include "incore.h"
#include "prefetch.h"
#include <sys/resource.h>
diff --git a/repair/phase1.c b/repair/phase1.c
index 00b9858..847bdca 100644
--- a/repair/phase1.c
+++ b/repair/phase1.c
@@ -4,9 +4,7 @@
* All Rights Reserved.
*/
-#include "libxfs.h"
#include "globals.h"
-#include "agheader.h"
#include "protos.h"
#include "err_protos.h"
diff --git a/repair/phase2.c b/repair/phase2.c
index 4bd6c63..0f3bfb2 100644
--- a/repair/phase2.c
+++ b/repair/phase2.c
@@ -6,10 +6,7 @@
#include "libxfs.h"
#include "libxlog.h"
-#include "avl.h"
#include "globals.h"
-#include "agheader.h"
-#include "protos.h"
#include "err_protos.h"
#include "incore.h"
#include "progress.h"
diff --git a/repair/phase3.c b/repair/phase3.c
index 161852e..a4c1b78 100644
--- a/repair/phase3.c
+++ b/repair/phase3.c
@@ -7,11 +7,7 @@
#include "libxfs.h"
#include "threads.h"
#include "prefetch.h"
-#include "avl.h"
#include "globals.h"
-#include "agheader.h"
-#include "incore.h"
-#include "protos.h"
#include "err_protos.h"
#include "dinode.h"
#include "progress.h"
diff --git a/repair/phase4.c b/repair/phase4.c
index 66e69db..c148950 100644
--- a/repair/phase4.c
+++ b/repair/phase4.c
@@ -7,16 +7,11 @@
#include "libxfs.h"
#include "threads.h"
#include "prefetch.h"
-#include "avl.h"
#include "globals.h"
-#include "agheader.h"
-#include "incore.h"
-#include "protos.h"
#include "err_protos.h"
#include "dinode.h"
#include "bmap.h"
#include "versions.h"
-#include "dir2.h"
#include "progress.h"
#include "slab.h"
#include "rmap.h"
diff --git a/repair/phase5.c b/repair/phase5.c
index 0f6a839..8e5e3a8 100644
--- a/repair/phase5.c
+++ b/repair/phase5.c
@@ -4,17 +4,11 @@
* All Rights Reserved.
*/
-#include "libxfs.h"
-#include "avl.h"
#include "globals.h"
-#include "agheader.h"
#include "incore.h"
-#include "protos.h"
#include "err_protos.h"
-#include "dinode.h"
#include "rt.h"
#include "versions.h"
-#include "threads.h"
#include "progress.h"
#include "slab.h"
#include "rmap.h"
diff --git a/repair/phase6.c b/repair/phase6.c
index 28e633d..b4b57db 100644
--- a/repair/phase6.c
+++ b/repair/phase6.c
@@ -7,15 +7,10 @@
#include "libxfs.h"
#include "threads.h"
#include "prefetch.h"
-#include "avl.h"
#include "globals.h"
-#include "agheader.h"
-#include "incore.h"
#include "dir2.h"
-#include "protos.h"
#include "err_protos.h"
#include "dinode.h"
-#include "progress.h"
#include "versions.h"
static struct cred zerocr;
diff --git a/repair/phase7.c b/repair/phase7.c
index c299647..9197555 100644
--- a/repair/phase7.c
+++ b/repair/phase7.c
@@ -4,15 +4,9 @@
* All Rights Reserved.
*/
-#include "libxfs.h"
-#include "avl.h"
#include "globals.h"
-#include "agheader.h"
#include "incore.h"
-#include "protos.h"
#include "err_protos.h"
-#include "dinode.h"
-#include "versions.h"
#include "progress.h"
#include "threads.h"
diff --git a/repair/prefetch.c b/repair/prefetch.c
index 1de0e2f..e61f75f 100644
--- a/repair/prefetch.c
+++ b/repair/prefetch.c
@@ -1,21 +1,12 @@
// SPDX-License-Identifier: GPL-2.0
-#include "libxfs.h"
#include <pthread.h>
-#include "avl.h"
#include "btree.h"
#include "globals.h"
-#include "agheader.h"
-#include "incore.h"
-#include "dir2.h"
-#include "protos.h"
#include "err_protos.h"
#include "dinode.h"
-#include "bmap.h"
-#include "versions.h"
#include "threads.h"
#include "prefetch.h"
-#include "progress.h"
int do_prefetch = 1;
diff --git a/repair/progress.c b/repair/progress.c
index 5ee0822..b826d4c 100644
--- a/repair/progress.c
+++ b/repair/progress.c
@@ -1,6 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
-#include "libxfs.h"
#include "globals.h"
#include "progress.h"
#include "err_protos.h"
diff --git a/repair/rmap.c b/repair/rmap.c
index 47828a0..8a7757e 100644
--- a/repair/rmap.c
+++ b/repair/rmap.c
@@ -4,9 +4,7 @@
* Author: Darrick J. Wong <darrick.wong@oracle.com>
*/
#include <libxfs.h>
-#include "btree.h"
#include "err_protos.h"
-#include "libxlog.h"
#include "incore.h"
#include "globals.h"
#include "dinode.h"
diff --git a/repair/rt.c b/repair/rt.c
index 7108e3d..8f8982c 100644
--- a/repair/rt.c
+++ b/repair/rt.c
@@ -4,15 +4,9 @@
* All Rights Reserved.
*/
-#include "libxfs.h"
-#include "avl.h"
#include "globals.h"
-#include "agheader.h"
#include "incore.h"
-#include "dinode.h"
-#include "protos.h"
#include "err_protos.h"
-#include "rt.h"
#define xfs_highbit64 libxfs_highbit64 /* for XFS_RTBLOCKLOG macro */
diff --git a/repair/sb.c b/repair/sb.c
index 119bf21..7d44c3b 100644
--- a/repair/sb.c
+++ b/repair/sb.c
@@ -4,7 +4,6 @@
* All Rights Reserved.
*/
#include "libfrog.h"
-#include "libxfs.h"
#include "libxcmd.h"
#include "libxlog.h"
#include "agheader.h"
diff --git a/repair/scan.c b/repair/scan.c
index 0290856..efb5a15 100644
--- a/repair/scan.c
+++ b/repair/scan.c
@@ -4,15 +4,12 @@
* All Rights Reserved.
*/
-#include "libxfs.h"
-#include "avl.h"
#include "globals.h"
#include "agheader.h"
#include "incore.h"
#include "protos.h"
#include "err_protos.h"
#include "dinode.h"
-#include "scan.h"
#include "versions.h"
#include "bmap.h"
#include "progress.h"
diff --git a/repair/slab.c b/repair/slab.c
index ba5c232..78a7b93 100644
--- a/repair/slab.c
+++ b/repair/slab.c
@@ -4,7 +4,6 @@
* Author: Darrick J. Wong <darrick.wong@oracle.com>
*/
#include <libxfs.h>
-#include "slab.h"
#undef SLAB_DEBUG
diff --git a/repair/threads.c b/repair/threads.c
index d219092..3851a2b 100644
--- a/repair/threads.c
+++ b/repair/threads.c
@@ -1,12 +1,9 @@
// SPDX-License-Identifier: GPL-2.0
#include "libxfs.h"
-#include <pthread.h>
#include <signal.h>
#include "threads.h"
#include "err_protos.h"
-#include "protos.h"
-#include "globals.h"
void
thread_init(void)
diff --git a/repair/versions.c b/repair/versions.c
index 4c44b4e..34574e6 100644
--- a/repair/versions.c
+++ b/repair/versions.c
@@ -4,11 +4,9 @@
* All Rights Reserved.
*/
-#include "libxfs.h"
#include "err_protos.h"
#include "globals.h"
-#include "versions.h"
/*
* filesystem feature global vars, set to 1 if the feature
diff --git a/repair/xfs_repair.c b/repair/xfs_repair.c
index 9657503..3b65682 100644
--- a/repair/xfs_repair.c
+++ b/repair/xfs_repair.c
@@ -8,16 +8,11 @@
#include "libxlog.h"
#include <sys/resource.h>
#include "xfs_multidisk.h"
-#include "avl.h"
-#include "avl64.h"
#include "globals.h"
#include "versions.h"
-#include "agheader.h"
#include "protos.h"
-#include "incore.h"
#include "err_protos.h"
#include "prefetch.h"
-#include "threads.h"
#include "progress.h"
#include "dinode.h"
#include "slab.h"
--
1.8.3.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 10/11] xfs_scrub: remove unneeded includes
2019-06-20 21:29 [PATCH 00/11] xfsprogs: remove unneeded #includes Eric Sandeen
` (8 preceding siblings ...)
2019-06-20 21:29 ` [PATCH 09/11] xfs_repair: " Eric Sandeen
@ 2019-06-20 21:29 ` Eric Sandeen
2019-06-20 21:29 ` [PATCH 11/11] xfs_spaceman: " Eric Sandeen
` (2 subsequent siblings)
12 siblings, 0 replies; 17+ messages in thread
From: Eric Sandeen @ 2019-06-20 21:29 UTC (permalink / raw)
To: linux-xfs
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
scrub/common.c | 1 -
scrub/counter.c | 5 -----
scrub/disk.c | 2 --
scrub/filemap.c | 4 ----
scrub/fscounters.c | 2 --
scrub/inodes.c | 3 ---
scrub/phase1.c | 8 --------
scrub/phase2.c | 2 --
scrub/phase3.c | 3 ---
scrub/phase4.c | 2 --
scrub/phase5.c | 3 ---
scrub/phase6.c | 3 ---
scrub/phase7.c | 2 --
scrub/progress.c | 4 ----
scrub/read_verify.c | 1 -
scrub/repair.c | 2 --
scrub/scrub.c | 3 ---
scrub/spacemap.c | 2 --
scrub/unicrash.c | 4 ----
scrub/vfs.c | 2 --
scrub/xfs_scrub.c | 4 ----
21 files changed, 62 deletions(-)
diff --git a/scrub/common.c b/scrub/common.c
index 1cd2b7b..6f6137e 100644
--- a/scrub/common.c
+++ b/scrub/common.c
@@ -7,7 +7,6 @@
#include <pthread.h>
#include <sys/statvfs.h>
#include <syslog.h>
-#include "platform_defs.h"
#include "path.h"
#include "xfs_scrub.h"
#include "common.h"
diff --git a/scrub/counter.c b/scrub/counter.c
index 4800e75..60094ec 100644
--- a/scrub/counter.c
+++ b/scrub/counter.c
@@ -4,13 +4,8 @@
* Author: Darrick J. Wong <darrick.wong@oracle.com>
*/
#include "xfs.h"
-#include <stdint.h>
#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <pthread.h>
#include "ptvar.h"
-#include "counter.h"
/*
* Per-Thread Counters
diff --git a/scrub/disk.c b/scrub/disk.c
index dd10953..cf1dd21 100644
--- a/scrub/disk.c
+++ b/scrub/disk.c
@@ -4,7 +4,6 @@
* Author: Darrick J. Wong <darrick.wong@oracle.com>
*/
#include "xfs.h"
-#include <stdint.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
@@ -16,7 +15,6 @@
#ifdef HAVE_HDIO_GETGEO
# include <linux/hdreg.h>
#endif
-#include "platform_defs.h"
#include "libfrog.h"
#include "path.h"
#include "xfs_scrub.h"
diff --git a/scrub/filemap.c b/scrub/filemap.c
index dc8f488..601ccbb 100644
--- a/scrub/filemap.c
+++ b/scrub/filemap.c
@@ -4,11 +4,7 @@
* Author: Darrick J. Wong <darrick.wong@oracle.com>
*/
#include "xfs.h"
-#include <stdint.h>
#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <sys/types.h>
#include <sys/statvfs.h>
#include "path.h"
#include "xfs_scrub.h"
diff --git a/scrub/fscounters.c b/scrub/fscounters.c
index 9e93e2a..d3b8fc1 100644
--- a/scrub/fscounters.c
+++ b/scrub/fscounters.c
@@ -4,7 +4,6 @@
* Author: Darrick J. Wong <darrick.wong@oracle.com>
*/
#include "xfs.h"
-#include <stdint.h>
#include <stdlib.h>
#include <sys/statvfs.h>
#include "platform_defs.h"
@@ -14,7 +13,6 @@
#include "workqueue.h"
#include "xfs_scrub.h"
#include "common.h"
-#include "fscounters.h"
/*
* Filesystem counter collection routines. We can count the number of
diff --git a/scrub/inodes.c b/scrub/inodes.c
index 442a597..bfa2c84 100644
--- a/scrub/inodes.c
+++ b/scrub/inodes.c
@@ -4,9 +4,6 @@
* Author: Darrick J. Wong <darrick.wong@oracle.com>
*/
#include "xfs.h"
-#include <stdint.h>
-#include <stdlib.h>
-#include <pthread.h>
#include <sys/statvfs.h>
#include "platform_defs.h"
#include "xfs_arch.h"
diff --git a/scrub/phase1.c b/scrub/phase1.c
index 04a5f4a..94d02c9 100644
--- a/scrub/phase1.c
+++ b/scrub/phase1.c
@@ -6,20 +6,12 @@
#include "xfs.h"
#include <unistd.h>
#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/resource.h>
#include <sys/statvfs.h>
#include <fcntl.h>
-#include <dirent.h>
-#include <stdint.h>
-#include <pthread.h>
#include "libfrog.h"
-#include "workqueue.h"
-#include "input.h"
#include "path.h"
#include "handle.h"
#include "bitops.h"
-#include "avl64.h"
#include "list.h"
#include "xfs_scrub.h"
#include "common.h"
diff --git a/scrub/phase2.c b/scrub/phase2.c
index 653f666..a647f03 100644
--- a/scrub/phase2.c
+++ b/scrub/phase2.c
@@ -4,8 +4,6 @@
* Author: Darrick J. Wong <darrick.wong@oracle.com>
*/
#include "xfs.h"
-#include <stdint.h>
-#include <sys/types.h>
#include <sys/statvfs.h>
#include "list.h"
#include "path.h"
diff --git a/scrub/phase3.c b/scrub/phase3.c
index 4963d67..250e848 100644
--- a/scrub/phase3.c
+++ b/scrub/phase3.c
@@ -4,12 +4,9 @@
* Author: Darrick J. Wong <darrick.wong@oracle.com>
*/
#include "xfs.h"
-#include <stdint.h>
-#include <sys/types.h>
#include <sys/statvfs.h>
#include "list.h"
#include "path.h"
-#include "workqueue.h"
#include "xfs_scrub.h"
#include "common.h"
#include "counter.h"
diff --git a/scrub/phase4.c b/scrub/phase4.c
index 7924832..b70d170 100644
--- a/scrub/phase4.c
+++ b/scrub/phase4.c
@@ -4,9 +4,7 @@
* Author: Darrick J. Wong <darrick.wong@oracle.com>
*/
#include "xfs.h"
-#include <stdint.h>
#include <dirent.h>
-#include <sys/types.h>
#include <sys/statvfs.h>
#include "list.h"
#include "path.h"
diff --git a/scrub/phase5.c b/scrub/phase5.c
index 1743119..e9a5c8e 100644
--- a/scrub/phase5.c
+++ b/scrub/phase5.c
@@ -4,18 +4,15 @@
* Author: Darrick J. Wong <darrick.wong@oracle.com>
*/
#include "xfs.h"
-#include <stdint.h>
#include <dirent.h>
#include <sys/types.h>
#include <sys/statvfs.h>
#ifdef HAVE_LIBATTR
# include <attr/attributes.h>
#endif
-#include <linux/fs.h>
#include "handle.h"
#include "list.h"
#include "path.h"
-#include "workqueue.h"
#include "xfs_scrub.h"
#include "common.h"
#include "inodes.h"
diff --git a/scrub/phase6.c b/scrub/phase6.c
index 66e6451..fe35971 100644
--- a/scrub/phase6.c
+++ b/scrub/phase6.c
@@ -4,12 +4,9 @@
* Author: Darrick J. Wong <darrick.wong@oracle.com>
*/
#include "xfs.h"
-#include <stdint.h>
#include <dirent.h>
#include <sys/statvfs.h>
-#include "handle.h"
#include "path.h"
-#include "workqueue.h"
#include "xfs_scrub.h"
#include "common.h"
#include "bitmap.h"
diff --git a/scrub/phase7.c b/scrub/phase7.c
index 0c3202e..ec891e6 100644
--- a/scrub/phase7.c
+++ b/scrub/phase7.c
@@ -4,8 +4,6 @@
* Author: Darrick J. Wong <darrick.wong@oracle.com>
*/
#include "xfs.h"
-#include <stdint.h>
-#include <stdlib.h>
#include <sys/statvfs.h>
#include "path.h"
#include "ptvar.h"
diff --git a/scrub/progress.c b/scrub/progress.c
index d0afe90..06e0d8e 100644
--- a/scrub/progress.c
+++ b/scrub/progress.c
@@ -4,15 +4,11 @@
* Author: Darrick J. Wong <darrick.wong@oracle.com>
*/
#include "xfs.h"
-#include <dirent.h>
#include <pthread.h>
#include <sys/statvfs.h>
#include <time.h>
#include "path.h"
-#include "disk.h"
-#include "read_verify.h"
#include "xfs_scrub.h"
-#include "common.h"
#include "counter.h"
#include "progress.h"
diff --git a/scrub/read_verify.c b/scrub/read_verify.c
index 4a9b91f..c3c9f98 100644
--- a/scrub/read_verify.c
+++ b/scrub/read_verify.c
@@ -4,7 +4,6 @@
* Author: Darrick J. Wong <darrick.wong@oracle.com>
*/
#include "xfs.h"
-#include <stdint.h>
#include <stdlib.h>
#include <sys/statvfs.h>
#include "ptvar.h"
diff --git a/scrub/repair.c b/scrub/repair.c
index 4ed3c09..56c2f42 100644
--- a/scrub/repair.c
+++ b/scrub/repair.c
@@ -4,9 +4,7 @@
* Author: Darrick J. Wong <darrick.wong@oracle.com>
*/
#include "xfs.h"
-#include <stdint.h>
#include <stdlib.h>
-#include <sys/types.h>
#include <sys/statvfs.h>
#include "list.h"
#include "path.h"
diff --git a/scrub/scrub.c b/scrub/scrub.c
index 0f0c963..1a16631 100644
--- a/scrub/scrub.c
+++ b/scrub/scrub.c
@@ -4,11 +4,8 @@
* Author: Darrick J. Wong <darrick.wong@oracle.com>
*/
#include "xfs.h"
-#include <stdint.h>
#include <stdlib.h>
-#include <unistd.h>
#include <string.h>
-#include <sys/types.h>
#include <sys/statvfs.h>
#include "list.h"
#include "path.h"
diff --git a/scrub/spacemap.c b/scrub/spacemap.c
index d547a04..730f380 100644
--- a/scrub/spacemap.c
+++ b/scrub/spacemap.c
@@ -4,9 +4,7 @@
* Author: Darrick J. Wong <darrick.wong@oracle.com>
*/
#include "xfs.h"
-#include <stdint.h>
#include <string.h>
-#include <pthread.h>
#include <sys/statvfs.h>
#include "workqueue.h"
#include "path.h"
diff --git a/scrub/unicrash.c b/scrub/unicrash.c
index 824b10f..f3cc9f9 100644
--- a/scrub/unicrash.c
+++ b/scrub/unicrash.c
@@ -4,19 +4,15 @@
* Author: Darrick J. Wong <darrick.wong@oracle.com>
*/
#include "xfs.h"
-#include <stdint.h>
#include <stdlib.h>
#include <dirent.h>
-#include <sys/types.h>
#include <sys/statvfs.h>
-#include <strings.h>
#include <unicode/ustring.h>
#include <unicode/unorm2.h>
#include <unicode/uspoof.h>
#include "path.h"
#include "xfs_scrub.h"
#include "common.h"
-#include "unicrash.h"
/*
* Detect Unicode confusable names in directories and attributes.
diff --git a/scrub/vfs.c b/scrub/vfs.c
index 8bcc4e7..ef3cece 100644
--- a/scrub/vfs.c
+++ b/scrub/vfs.c
@@ -4,11 +4,9 @@
* Author: Darrick J. Wong <darrick.wong@oracle.com>
*/
#include "xfs.h"
-#include <stdint.h>
#include <dirent.h>
#include <sys/types.h>
#include <sys/statvfs.h>
-#include "handle.h"
#include "path.h"
#include "workqueue.h"
#include "xfs_scrub.h"
diff --git a/scrub/xfs_scrub.c b/scrub/xfs_scrub.c
index 71fc274..a35cf1f 100644
--- a/scrub/xfs_scrub.c
+++ b/scrub/xfs_scrub.c
@@ -3,19 +3,15 @@
* Copyright (C) 2018 Oracle. All Rights Reserved.
* Author: Darrick J. Wong <darrick.wong@oracle.com>
*/
-#include "xfs.h"
#include <pthread.h>
#include <stdlib.h>
-#include <paths.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/statvfs.h>
-#include "platform_defs.h"
#include "input.h"
#include "path.h"
#include "xfs_scrub.h"
#include "common.h"
-#include "unicrash.h"
#include "progress.h"
/*
--
1.8.3.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 11/11] xfs_spaceman: remove unneeded includes
2019-06-20 21:29 [PATCH 00/11] xfsprogs: remove unneeded #includes Eric Sandeen
` (9 preceding siblings ...)
2019-06-20 21:29 ` [PATCH 10/11] xfs_scrub: " Eric Sandeen
@ 2019-06-20 21:29 ` Eric Sandeen
2019-06-20 22:06 ` [PATCH 00/11] xfsprogs: remove unneeded #includes Dave Chinner
2019-06-25 11:01 ` Christoph Hellwig
12 siblings, 0 replies; 17+ messages in thread
From: Eric Sandeen @ 2019-06-20 21:29 UTC (permalink / raw)
To: linux-xfs
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
spaceman/file.c | 3 ---
spaceman/freesp.c | 1 -
spaceman/init.c | 2 --
spaceman/prealloc.c | 1 -
4 files changed, 7 deletions(-)
diff --git a/spaceman/file.c b/spaceman/file.c
index 7e33e07..edc52b8 100644
--- a/spaceman/file.c
+++ b/spaceman/file.c
@@ -6,10 +6,7 @@
*/
#include "libxfs.h"
-#include <sys/mman.h>
#include "command.h"
-#include "input.h"
-#include "init.h"
#include "path.h"
#include "space.h"
diff --git a/spaceman/freesp.c b/spaceman/freesp.c
index 11d0aaf..bfc4793 100644
--- a/spaceman/freesp.c
+++ b/spaceman/freesp.c
@@ -7,7 +7,6 @@
*/
#include "libxfs.h"
-#include <linux/fiemap.h>
#include "command.h"
#include "init.h"
#include "path.h"
diff --git a/spaceman/init.c b/spaceman/init.c
index c845f92..ec0c22b 100644
--- a/spaceman/init.c
+++ b/spaceman/init.c
@@ -6,8 +6,6 @@
#include "libxfs.h"
#include "command.h"
-#include "input.h"
-#include "init.h"
#include "path.h"
#include "space.h"
diff --git a/spaceman/prealloc.c b/spaceman/prealloc.c
index 85dfc9e..c8aa5bd 100644
--- a/spaceman/prealloc.c
+++ b/spaceman/prealloc.c
@@ -7,7 +7,6 @@
#include "libxfs.h"
#include "command.h"
#include "input.h"
-#include "init.h"
#include "path.h"
#include "space.h"
--
1.8.3.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH 00/11] xfsprogs: remove unneeded #includes
2019-06-20 21:29 [PATCH 00/11] xfsprogs: remove unneeded #includes Eric Sandeen
` (10 preceding siblings ...)
2019-06-20 21:29 ` [PATCH 11/11] xfs_spaceman: " Eric Sandeen
@ 2019-06-20 22:06 ` Dave Chinner
2020-01-30 16:59 ` Eric Sandeen
2019-06-25 11:01 ` Christoph Hellwig
12 siblings, 1 reply; 17+ messages in thread
From: Dave Chinner @ 2019-06-20 22:06 UTC (permalink / raw)
To: Eric Sandeen; +Cc: linux-xfs
On Thu, Jun 20, 2019 at 04:29:23PM -0500, Eric Sandeen wrote:
> This is the result of a mechanical process and ... may have a few
> oddities, for example removing "init.h" from some utils made me
> realize that we inherit it from libxfs and also have it in local
We do? That'd be really, really broken if we did - including local
header files from a global header files is not a good idea.
/me goes looking, can't find where libxfs.h includes init.h
libxfs/init.h is private to libxfs/, it's not a global include file,
and it is included directly in all the libxfs/*.c files that need
it, which is 3 files - init.c, rdwr.c and util.c.
> headers; libxfs has a global but so does scrub, etc. So that stuff
> can/should be fixed up, but in the meantime, this zaps out a ton
> of header dependencies, and seems worthwhile.
IMO, this doesn't improve the tangle of header files in userspace.
All it does is make the include patterns inconsistent across files
because of the tangled mess of the libxfs/ vs include/ header files
that was never completely resolved when libxfs was created as a
shared kernel library....
IOWs, the include pattern I was originally aiming for with the
libxfs/ shared userspace/kernel library was:
#include "libxfs_priv.h"
<include shared kernel header files>
And for things outside libxfs/ that use libxfs:
#include "libxfs.h"
<include local header files>
IOWs, "libxfs_priv.h" contained the includes for all the local
userspace libxfs includes and defines and non-shared support
structures, and it would export on build all the header files that
external code needs to build into include/ via symlinks. This is
incomplete - stuff like include/xfs_mount.h, xfs_inode.h, etc needs
to move into libxfs as private header files (similar to how they are
private in the kernel) and then exported at build time.
Likewise, "libxfs.h" should only contain global include files and
those exported from libxfs, and that's all the external code should
include to use /anything/ from libxfs. i.e. a single include forms
the external interface to libxfs.
AFAIC, nothing should be including platform or build dependent
things like platform_defs.h, because that should be pulled in by
libxfs.h or libxfs_priv.h. And nothing external should need to pull
in, say, xfs_format.h or xfs_mount.h, because they are all pulled in
by include/libxfs.h (which it mostly does already).
Hence I'd prefer we finish untangling the header file include mess
before we cull unneceesary includes. Otherwise we are going to end
up culling the wrong includes and then have to clean up that mess as
well to bring the code back to being clean and consistent....
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 01/11] xfs_estimate: remove unneeded includes
2019-06-20 21:29 ` [PATCH 01/11] xfs_estimate: remove unneeded includes Eric Sandeen
@ 2019-06-25 11:01 ` Christoph Hellwig
0 siblings, 0 replies; 17+ messages in thread
From: Christoph Hellwig @ 2019-06-25 11:01 UTC (permalink / raw)
To: Eric Sandeen; +Cc: linux-xfs
On Thu, Jun 20, 2019 at 04:29:24PM -0500, Eric Sandeen wrote:
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 00/11] xfsprogs: remove unneeded #includes
2019-06-20 21:29 [PATCH 00/11] xfsprogs: remove unneeded #includes Eric Sandeen
` (11 preceding siblings ...)
2019-06-20 22:06 ` [PATCH 00/11] xfsprogs: remove unneeded #includes Dave Chinner
@ 2019-06-25 11:01 ` Christoph Hellwig
12 siblings, 0 replies; 17+ messages in thread
From: Christoph Hellwig @ 2019-06-25 11:01 UTC (permalink / raw)
To: Eric Sandeen; +Cc: linux-xfs
The whole series looks good to me:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 00/11] xfsprogs: remove unneeded #includes
2019-06-20 22:06 ` [PATCH 00/11] xfsprogs: remove unneeded #includes Dave Chinner
@ 2020-01-30 16:59 ` Eric Sandeen
2020-01-31 2:11 ` Dave Chinner
0 siblings, 1 reply; 17+ messages in thread
From: Eric Sandeen @ 2020-01-30 16:59 UTC (permalink / raw)
To: Dave Chinner, Eric Sandeen; +Cc: linux-xfs
On 6/20/19 5:06 PM, Dave Chinner wrote:
> On Thu, Jun 20, 2019 at 04:29:23PM -0500, Eric Sandeen wrote:
>> This is the result of a mechanical process and ... may have a few
>> oddities, for example removing "init.h" from some utils made me
>> realize that we inherit it from libxfs and also have it in local
>
> We do? That'd be really, really broken if we did - including local
> header files from a global header files is not a good idea.
>
> /me goes looking, can't find where libxfs.h includes init.h
>
> libxfs/init.h is private to libxfs/, it's not a global include file,
> and it is included directly in all the libxfs/*.c files that need
> it, which is 3 files - init.c, rdwr.c and util.c.
>
>> headers; libxfs has a global but so does scrub, etc. So that stuff
>> can/should be fixed up, but in the meantime, this zaps out a ton
>> of header dependencies, and seems worthwhile.
>
> IMO, this doesn't improve the tangle of header files in userspace.
> All it does is make the include patterns inconsistent across files
> because of the tangled mess of the libxfs/ vs include/ header files
> that was never completely resolved when libxfs was created as a
> shared kernel library....
>
> IOWs, the include pattern I was originally aiming for with the
> libxfs/ shared userspace/kernel library was:
>
> #include "libxfs_priv.h"
> <include shared kernel header files>
>
> And for things outside libxfs/ that use libxfs:
>
> #include "libxfs.h"
> <include local header files>
>
> IOWs, "libxfs_priv.h" contained the includes for all the local
> userspace libxfs includes and defines and non-shared support
> structures, and it would export on build all the header files that
> external code needs to build into include/ via symlinks. This is
> incomplete - stuff like include/xfs_mount.h, xfs_inode.h, etc needs
> to move into libxfs as private header files (similar to how they are
> private in the kernel) and then exported at build time.
>
> Likewise, "libxfs.h" should only contain global include files and
> those exported from libxfs, and that's all the external code should
> include to use /anything/ from libxfs. i.e. a single include forms
> the external interface to libxfs.
>
> AFAIC, nothing should be including platform or build dependent
> things like platform_defs.h, because that should be pulled in by
> libxfs.h or libxfs_priv.h. And nothing external should need to pull
> in, say, xfs_format.h or xfs_mount.h, because they are all pulled in
> by include/libxfs.h (which it mostly does already).
>
> Hence I'd prefer we finish untangling the header file include mess
> before we cull unneceesary includes. Otherwise we are going to end
> up culling the wrong includes and then have to clean up that mess as
> well to bring the code back to being clean and consistent....
Dave, what if I reworked this to only remove unneeded system include files
for now. Would you be more comfortable with that? I assume there's no
argument with i.e.
diff --git a/estimate/xfs_estimate.c b/estimate/xfs_estimate.c
index 9e01cce..189bb6c 100644
--- a/estimate/xfs_estimate.c
+++ b/estimate/xfs_estimate.c
@@ -10,7 +10,6 @@
* XXX: assumes dirv1 format.
*/
#include "libxfs.h"
-#include <sys/stat.h>
#include <ftw.h>
right?
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH 00/11] xfsprogs: remove unneeded #includes
2020-01-30 16:59 ` Eric Sandeen
@ 2020-01-31 2:11 ` Dave Chinner
0 siblings, 0 replies; 17+ messages in thread
From: Dave Chinner @ 2020-01-31 2:11 UTC (permalink / raw)
To: Eric Sandeen; +Cc: Eric Sandeen, linux-xfs
On Thu, Jan 30, 2020 at 10:59:22AM -0600, Eric Sandeen wrote:
> On 6/20/19 5:06 PM, Dave Chinner wrote:
> > On Thu, Jun 20, 2019 at 04:29:23PM -0500, Eric Sandeen wrote:
> >> This is the result of a mechanical process and ... may have a few
> >> oddities, for example removing "init.h" from some utils made me
> >> realize that we inherit it from libxfs and also have it in local
> >
> > We do? That'd be really, really broken if we did - including local
> > header files from a global header files is not a good idea.
> >
> > /me goes looking, can't find where libxfs.h includes init.h
> >
> > libxfs/init.h is private to libxfs/, it's not a global include file,
> > and it is included directly in all the libxfs/*.c files that need
> > it, which is 3 files - init.c, rdwr.c and util.c.
> >
> >> headers; libxfs has a global but so does scrub, etc. So that stuff
> >> can/should be fixed up, but in the meantime, this zaps out a ton
> >> of header dependencies, and seems worthwhile.
> >
> > IMO, this doesn't improve the tangle of header files in userspace.
> > All it does is make the include patterns inconsistent across files
> > because of the tangled mess of the libxfs/ vs include/ header files
> > that was never completely resolved when libxfs was created as a
> > shared kernel library....
> >
> > IOWs, the include pattern I was originally aiming for with the
> > libxfs/ shared userspace/kernel library was:
> >
> > #include "libxfs_priv.h"
> > <include shared kernel header files>
> >
> > And for things outside libxfs/ that use libxfs:
> >
> > #include "libxfs.h"
> > <include local header files>
> >
> > IOWs, "libxfs_priv.h" contained the includes for all the local
> > userspace libxfs includes and defines and non-shared support
> > structures, and it would export on build all the header files that
> > external code needs to build into include/ via symlinks. This is
> > incomplete - stuff like include/xfs_mount.h, xfs_inode.h, etc needs
> > to move into libxfs as private header files (similar to how they are
> > private in the kernel) and then exported at build time.
> >
> > Likewise, "libxfs.h" should only contain global include files and
> > those exported from libxfs, and that's all the external code should
> > include to use /anything/ from libxfs. i.e. a single include forms
> > the external interface to libxfs.
> >
> > AFAIC, nothing should be including platform or build dependent
> > things like platform_defs.h, because that should be pulled in by
> > libxfs.h or libxfs_priv.h. And nothing external should need to pull
> > in, say, xfs_format.h or xfs_mount.h, because they are all pulled in
> > by include/libxfs.h (which it mostly does already).
> >
> > Hence I'd prefer we finish untangling the header file include mess
> > before we cull unneceesary includes. Otherwise we are going to end
> > up culling the wrong includes and then have to clean up that mess as
> > well to bring the code back to being clean and consistent....
>
> Dave, what if I reworked this to only remove unneeded system include files
> for now. Would you be more comfortable with that? I assume there's no
> argument with i.e.
>
> diff --git a/estimate/xfs_estimate.c b/estimate/xfs_estimate.c
> index 9e01cce..189bb6c 100644
> --- a/estimate/xfs_estimate.c
> +++ b/estimate/xfs_estimate.c
> @@ -10,7 +10,6 @@
> * XXX: assumes dirv1 format.
> */
> #include "libxfs.h"
> -#include <sys/stat.h>
> #include <ftw.h>
>
> right?
*nod*
That sort of thing can easily be cleaned up.
-Dave.
--
Dave Chinner
david@fromorbit.com
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2020-01-31 2:11 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-20 21:29 [PATCH 00/11] xfsprogs: remove unneeded #includes Eric Sandeen
2019-06-20 21:29 ` [PATCH 01/11] xfs_estimate: remove unneeded includes Eric Sandeen
2019-06-25 11:01 ` Christoph Hellwig
2019-06-20 21:29 ` [PATCH 02/11] xfs_fsr: " Eric Sandeen
2019-06-20 21:29 ` [PATCH 03/11] xfs_io: " Eric Sandeen
2019-06-20 21:29 ` [PATCH 04/11] libfrog: " Eric Sandeen
2019-06-20 21:29 ` [PATCH 05/11] libxcmd: " Eric Sandeen
2019-06-20 21:29 ` [PATCH 06/11] libxfs: " Eric Sandeen
2019-06-20 21:29 ` [PATCH 07/11] xfs_logprint: " Eric Sandeen
2019-06-20 21:29 ` [PATCH 08/11] xfs_quota: " Eric Sandeen
2019-06-20 21:29 ` [PATCH 09/11] xfs_repair: " Eric Sandeen
2019-06-20 21:29 ` [PATCH 10/11] xfs_scrub: " Eric Sandeen
2019-06-20 21:29 ` [PATCH 11/11] xfs_spaceman: " Eric Sandeen
2019-06-20 22:06 ` [PATCH 00/11] xfsprogs: remove unneeded #includes Dave Chinner
2020-01-30 16:59 ` Eric Sandeen
2020-01-31 2:11 ` Dave Chinner
2019-06-25 11:01 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).