xfsprogs: remove unneeded #includes
cover xfsprogs: remove unneeded #includes
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
PATCH 1/11 xfs_estimate: remove unneeded includes
--- estimate/xfs_estimate.c | 1 - 1 file changed, 1 deletion(-)
estimate/xfs_estimate.c +0 -1
@@ -10,7 +10,6 @@* XXX: assumes dirv1 format. */ #include "libxfs.h" -#include <sys/stat.h> #include <ftw.h> static unsigned long long
Signature · 1 line
1.8.3.1
Re: [PATCH 01/11] xfs_estimate: remove unneeded includes
Quoted 1 line · Eric Sandeen
Signed-off-by Eric Sandeen <[email protected]>
Looks good,
PATCH 2/11 xfs_fsr: remove unneeded includes
In reply to Eric Sandeen--- fsr/xfs_fsr.c | 7 ------- 1 file changed, 7 deletions(-)
fsr/xfs_fsr.c +0 -7
@@ -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"
Signature · 1 line
1.8.3.1
PATCH 3/11 xfs_io: remove unneeded includes
In reply to Eric Sandeen--- 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(-)
io/bmap.c +0 -1
@@ -4,7 +4,6 @@* All Rights Reserved. */ -#include "platform_defs.h" #include "command.h" #include "input.h" #include "init.h"
io/copy_file_range.c +0 -2
@@ -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"
io/cowextsize.c +0 -1
@@ -14,7 +14,6 @@#include "init.h" #include "io.h" #include "input.h" -#include "path.h" static cmdinfo_t cowextsize_cmd;static long cowextsize;
io/encrypt.c +0 -1
@@ -7,7 +7,6 @@#include "platform_defs.h" #include "command.h" #include "init.h" -#include "path.h" #include "io.h" #ifndef ARRAY_SIZE
io/fiemap.c +0 -1
@@ -4,7 +4,6 @@* All Rights Reserved. */ -#include "platform_defs.h" #include "command.h" #include "input.h" #include <linux/fiemap.h>
io/file.c +0 -1
@@ -6,7 +6,6 @@#include "command.h" #include "input.h" -#include <sys/mman.h> #include "init.h" #include "io.h"
io/fsmap.c +0 -1
@@ -6,7 +6,6 @@#include "platform_defs.h" #include "command.h" #include "init.h" -#include "path.h" #include "io.h" #include "input.h"
io/getrusage.c +0 -1
@@ -9,7 +9,6 @@#include <sys/time.h> #include <sys/resource.h> #include "init.h" -#include "io.h" static cmdinfo_t getrusage_cmd;
io/init.c +0 -2
@@ -5,9 +5,7 @@*/ #include <pthread.h> -#include "platform_defs.h" #include "command.h" -#include "input.h" #include "init.h" #include "io.h"
io/label.c +0 -3
@@ -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"
io/log_writes.c +0 -1
@@ -8,7 +8,6 @@#include <libdevmapper.h> #include "command.h" #include "init.h" -#include "io.h" static cmdinfo_t log_writes_cmd;
io/mmap.c +0 -1
@@ -7,7 +7,6 @@#include "command.h" #include "input.h" #include <sys/mman.h> -#include <signal.h> #include "init.h" #include "io.h"
io/parent.c +0 -1
@@ -6,7 +6,6 @@#include "command.h" #include "input.h" -#include "path.h" #include "parent.h" #include "handle.h" #include "jdm.h"
io/reflink.c +0 -2
@@ -4,8 +4,6 @@* All Rights Reserved. */ -#include <sys/uio.h> -#include <xfs/xfs.h> #include "command.h" #include "input.h" #include "init.h"
io/scrub.c +0 -3
@@ -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;
io/stat.c +0 -2
@@ -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;
Signature · 1 line
1.8.3.1
PATCH 4/11 libfrog: remove unneeded includes
In reply to Eric Sandeen--- 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(-)
libfrog/avl64.c +0 -1
@@ -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"
libfrog/bitmap.c +0 -2
@@ -4,11 +4,9 @@* Author: Darrick J. Wong <[email protected]> */ #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"
libfrog/convert.c +0 -2
@@ -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(
libfrog/crc32.c +0 -1
@@ -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 ;
libfrog/fsgeom.c +0 -1
@@ -3,7 +3,6 @@* Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. */ #include "libxfs.h" -#include "fsgeom.h" void xfs_report_geom(
libfrog/linux.c +0 -4
@@ -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;
libfrog/list_sort.c +0 -1
@@ -1,5 +1,4 @@/* List sorting code from Linux::lib/list_sort.c. */ -#include <stdlib.h> #include <string.h> #include "list.h"
libfrog/paths.c +0 -4
@@ -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;
libfrog/projects.c +0 -1
@@ -5,7 +5,6 @@*/ #include <stdio.h> -#include <stdlib.h> #include <string.h> #include "project.h"
libfrog/ptvar.c +0 -3
@@ -3,14 +3,11 @@* Copyright (C) 2018 Oracle. All Rights Reserved. * Author: Darrick J. Wong <[email protected]> */ -#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" /*
libfrog/radix-tree.c +0 -3
@@ -5,9 +5,6 @@* Copyright (C) 2005 SGI, Christoph Lameter <[email protected]> */ #include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <stdint.h> #include "platform_defs.h" #include "radix-tree.h"
libfrog/topology.c +0 -1
@@ -4,7 +4,6 @@* All Rights Reserved. */ -#include "libxfs.h" #include "libxcmd.h" #ifdef ENABLE_BLKID # include <blkid/blkid.h>
libfrog/util.c +0 -1
@@ -4,7 +4,6 @@* All Rights Reserved. */ #include "platform_defs.h" -#include "libfrog.h" /* * libfrog is a collection of miscellaneous userspace utilities.
libfrog/workqueue.c +0 -1
@@ -4,7 +4,6 @@* Author: Darrick J. Wong <[email protected]> */ #include <pthread.h> -#include <signal.h> #include <stdlib.h> #include <string.h> #include <stdint.h>
Signature · 1 line
1.8.3.1
PATCH 5/11 libxcmd: remove unneeded includes
In reply to Eric Sandeen--- libxcmd/command.c | 1 - libxcmd/help.c | 1 - libxcmd/input.c | 2 -- libxcmd/quit.c | 1 - 4 files changed, 5 deletions(-)
libxcmd/command.c +0 -1
@@ -4,7 +4,6 @@* All Rights Reserved. */ -#include "platform_defs.h" #include "command.h" #include "input.h"
libxcmd/help.c +0 -1
@@ -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);
libxcmd/input.c +0 -2
@@ -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>
libxcmd/quit.c +0 -1
@@ -6,7 +6,6 @@#include "platform_defs.h" #include "command.h" -#include "../quota/init.h" static cmdinfo_t quit_cmd;
Signature · 1 line
1.8.3.1
PATCH 6/11 libxfs: remove unneeded includes
In reply to Eric Sandeen--- 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(-)
libxfs/cache.c +0 -7
@@ -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
libxfs/defer_item.c +0 -3
@@ -4,13 +4,10 @@* Author: Darrick J. Wong <[email protected]> */ #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"
libxfs/init.c +0 -13
@@ -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 */
libxfs/logitem.c +0 -4
@@ -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"
libxfs/rdwr.c +0 -10
@@ -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 */
libxfs/trans.c +0 -3
@@ -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"
libxfs/util.c +0 -22
@@ -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
libxfs/xfs_ag.c +0 -2
@@ -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"
libxfs/xfs_ag_resv.c +0 -12
@@ -4,24 +4,12 @@* Author: Darrick J. Wong <[email protected]> */ #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"
libxfs/xfs_alloc.c +0 -5
@@ -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"
libxfs/xfs_alloc_btree.c +0 -5
@@ -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 *
libxfs/xfs_attr.c +0 -3
@@ -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"
libxfs/xfs_attr_leaf.c +0 -5
@@ -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"
libxfs/xfs_attr_remote.c +0 -7
@@ -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 */
libxfs/xfs_bit.c +0 -1
@@ -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.
libxfs/xfs_bmap.c +0 -4
@@ -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"
libxfs/xfs_bmap_btree.c +0 -3
@@ -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" /*
libxfs/xfs_btree.c +0 -6
@@ -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.
libxfs/xfs_da_btree.c +0 -5
@@ -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
libxfs/xfs_da_format.c +0 -5
@@ -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
libxfs/xfs_defer.c +0 -7
@@ -4,17 +4,10 @@* Author: Darrick J. Wong <[email protected]> */ #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" /*
libxfs/xfs_dir2.c +0 -6
@@ -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 };
libxfs/xfs_dir2_block.c +0 -4
@@ -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.
libxfs/xfs_dir2_data.c +0 -5
@@ -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,
libxfs/xfs_dir2_leaf.c +0 -4
@@ -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.
libxfs/xfs_dir2_node.c +0 -4
@@ -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.
libxfs/xfs_dir2_sf.c +0 -3
@@ -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"
libxfs/xfs_dquot_buf.c +0 -7
@@ -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
libxfs/xfs_ialloc.c +0 -4
@@ -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"
libxfs/xfs_ialloc_btree.c +0 -4
@@ -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"
libxfs/xfs_iext_tree.c +0 -4
@@ -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" /*
libxfs/xfs_inode_buf.c +0 -5
@@ -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"
libxfs/xfs_inode_fork.c +0 -2
@@ -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"
libxfs/xfs_log_rlimit.c +0 -3
@@ -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" /*
libxfs/xfs_refcount.c +0 -5
@@ -4,21 +4,16 @@* Author: Darrick J. Wong <[email protected]> */ #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"
libxfs/xfs_refcount_btree.c +0 -5
@@ -4,21 +4,16 @@* Author: Darrick J. Wong <[email protected]> */ #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 *
libxfs/xfs_rmap.c +0 -9
@@ -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]
libxfs/xfs_rmap_btree.c +0 -6
@@ -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" /*
libxfs/xfs_rtbitmap.c +0 -5
@@ -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" /*
libxfs/xfs_sb.c +0 -7
@@ -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.
libxfs/xfs_symlink_remote.c +0 -4
@@ -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"
libxfs/xfs_trans_inode.c +0 -4
@@ -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.
libxfs/xfs_trans_resv.c +0 -4
@@ -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
libxfs/xfs_types.c +0 -11
@@ -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
Signature · 1 line
1.8.3.1
PATCH 7/11 xfs_logprint: remove unneeded includes
In reply to Eric Sandeen--- logprint/log_print_trans.c | 1 - logprint/log_redo.c | 1 - 2 files changed, 2 deletions(-)
logprint/log_print_trans.c +0 -1
@@ -6,7 +6,6 @@#include "libxfs.h" #include "libxlog.h" -#include "logprint.h" void xlog_recover_print_trans_head(
logprint/log_redo.c +0 -1
@@ -7,7 +7,6 @@#include "libxfs.h" #include "libxlog.h" -#include "logprint.h" /* Extent Free Items */
Signature · 1 line
1.8.3.1
PATCH 8/11 xfs_quota: remove unneeded includes
In reply to Eric Sandeen--- 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(-)
quota/edit.c +0 -3
@@ -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"
quota/quot.c +0 -3
@@ -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"
quota/quota.c +0 -1
@@ -6,7 +6,6 @@#include <stdbool.h> #include "command.h" -#include <ctype.h> #include <pwd.h> #include <grp.h> #include "init.h"
quota/report.c +0 -1
@@ -8,7 +8,6 @@#include <sys/types.h> #include <pwd.h> #include <grp.h> -#include <utmp.h> #include "init.h" #include "quota.h"
quota/util.c +0 -1
@@ -8,7 +8,6 @@#include <stdbool.h> #include <pwd.h> #include <grp.h> -#include <utmp.h> #include "init.h" #include "quota.h"
Signature · 1 line
1.8.3.1
PATCH 9/11 xfs_repair: remove unneeded includes
In reply to Eric Sandeen--- 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(-)
repair/agheader.c +0 -1
@@ -4,7 +4,6 @@* All Rights Reserved. */ -#include "libxfs.h" #include "globals.h" #include "agheader.h" #include "protos.h"
repair/attr_repair.c +0 -4
@@ -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);
repair/btree.c +0 -1
@@ -5,7 +5,6 @@*/ #include "libxfs.h" -#include "btree.h" /* * Maximum number of keys per node. Must be greater than 2 for the code
repair/da_util.c +0 -1
@@ -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"
repair/dino_chunks.c +0 -5
@@ -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"
repair/dinode.c +0 -7
@@ -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"
repair/dir2.c +0 -5
@@ -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
repair/incore.c +0 -5
@@ -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
repair/incore_bmc.c +0 -5
@@ -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)
repair/incore_ext.c +0 -5
@@ -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:
repair/incore_ino.c +0 -5
@@ -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" /*
repair/init.c +0 -6
@@ -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>
repair/phase1.c +0 -2
@@ -4,9 +4,7 @@* All Rights Reserved. */ -#include "libxfs.h" #include "globals.h" -#include "agheader.h" #include "protos.h" #include "err_protos.h"
repair/phase2.c +0 -3
@@ -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"
repair/phase3.c +0 -4
@@ -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"
repair/phase4.c +0 -5
@@ -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"
repair/phase5.c +0 -6
@@ -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"
repair/phase6.c +0 -5
@@ -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;
repair/phase7.c +0 -6
@@ -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"
repair/prefetch.c +0 -9
@@ -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 ;
repair/progress.c +0 -1
@@ -1,6 +1,5 @@// SPDX-License-Identifier: GPL-2.0 -#include "libxfs.h" #include "globals.h" #include "progress.h" #include "err_protos.h"
repair/rmap.c +0 -2
@@ -4,9 +4,7 @@* Author: Darrick J. Wong <[email protected]> */ #include <libxfs.h> -#include "btree.h" #include "err_protos.h" -#include "libxlog.h" #include "incore.h" #include "globals.h" #include "dinode.h"
repair/rt.c +0 -6
@@ -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 */
repair/sb.c +0 -1
@@ -4,7 +4,6 @@* All Rights Reserved. */ #include "libfrog.h" -#include "libxfs.h" #include "libxcmd.h" #include "libxlog.h" #include "agheader.h"
repair/scan.c +0 -3
@@ -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"
repair/slab.c +0 -1
@@ -4,7 +4,6 @@* Author: Darrick J. Wong <[email protected]> */ #include <libxfs.h> -#include "slab.h" #undef SLAB_DEBUG
repair/threads.c +0 -3
@@ -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 )
repair/versions.c +0 -2
@@ -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
repair/xfs_repair.c +0 -5
@@ -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"
Signature · 1 line
1.8.3.1
PATCH 10/11 xfs_scrub: remove unneeded includes
In reply to Eric Sandeen--- 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(-)
scrub/common.c +0 -1
@@ -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"
scrub/counter.c +0 -5
@@ -4,13 +4,8 @@* Author: Darrick J. Wong <[email protected]> */ #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
scrub/disk.c +0 -2
@@ -4,7 +4,6 @@* Author: Darrick J. Wong <[email protected]> */ #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"
scrub/filemap.c +0 -4
@@ -4,11 +4,7 @@* Author: Darrick J. Wong <[email protected]> */ #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"
scrub/fscounters.c +0 -2
@@ -4,7 +4,6 @@* Author: Darrick J. Wong <[email protected]> */ #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
scrub/inodes.c +0 -3
@@ -4,9 +4,6 @@* Author: Darrick J. Wong <[email protected]> */ #include "xfs.h" -#include <stdint.h> -#include <stdlib.h> -#include <pthread.h> #include <sys/statvfs.h> #include "platform_defs.h" #include "xfs_arch.h"
scrub/phase1.c +0 -8
@@ -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"
scrub/phase2.c +0 -2
@@ -4,8 +4,6 @@* Author: Darrick J. Wong <[email protected]> */ #include "xfs.h" -#include <stdint.h> -#include <sys/types.h> #include <sys/statvfs.h> #include "list.h" #include "path.h"
scrub/phase3.c +0 -3
@@ -4,12 +4,9 @@* Author: Darrick J. Wong <[email protected]> */ #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"
scrub/phase4.c +0 -2
@@ -4,9 +4,7 @@* Author: Darrick J. Wong <[email protected]> */ #include "xfs.h" -#include <stdint.h> #include <dirent.h> -#include <sys/types.h> #include <sys/statvfs.h> #include "list.h" #include "path.h"
scrub/phase5.c +0 -3
@@ -4,18 +4,15 @@* Author: Darrick J. Wong <[email protected]> */ #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"
scrub/phase6.c +0 -3
@@ -4,12 +4,9 @@* Author: Darrick J. Wong <[email protected]> */ #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"
scrub/phase7.c +0 -2
@@ -4,8 +4,6 @@* Author: Darrick J. Wong <[email protected]> */ #include "xfs.h" -#include <stdint.h> -#include <stdlib.h> #include <sys/statvfs.h> #include "path.h" #include "ptvar.h"
scrub/progress.c +0 -4
@@ -4,15 +4,11 @@* Author: Darrick J. Wong <[email protected]> */ #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"
scrub/read_verify.c +0 -1
@@ -4,7 +4,6 @@* Author: Darrick J. Wong <[email protected]> */ #include "xfs.h" -#include <stdint.h> #include <stdlib.h> #include <sys/statvfs.h> #include "ptvar.h"
scrub/repair.c +0 -2
@@ -4,9 +4,7 @@* Author: Darrick J. Wong <[email protected]> */ #include "xfs.h" -#include <stdint.h> #include <stdlib.h> -#include <sys/types.h> #include <sys/statvfs.h> #include "list.h" #include "path.h"
scrub/scrub.c +0 -3
@@ -4,11 +4,8 @@* Author: Darrick J. Wong <[email protected]> */ #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"
scrub/spacemap.c +0 -2
@@ -4,9 +4,7 @@* Author: Darrick J. Wong <[email protected]> */ #include "xfs.h" -#include <stdint.h> #include <string.h> -#include <pthread.h> #include <sys/statvfs.h> #include "workqueue.h" #include "path.h"
scrub/unicrash.c +0 -4
@@ -4,19 +4,15 @@* Author: Darrick J. Wong <[email protected]> */ #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.
scrub/vfs.c +0 -2
@@ -4,11 +4,9 @@* Author: Darrick J. Wong <[email protected]> */ #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"
scrub/xfs_scrub.c +0 -4
@@ -3,19 +3,15 @@* Copyright (C) 2018 Oracle. All Rights Reserved. * Author: Darrick J. Wong <[email protected]> */ -#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" /*
Signature · 1 line
1.8.3.1
PATCH 11/11 xfs_spaceman: remove unneeded includes
In reply to Eric Sandeen--- spaceman/file.c | 3 --- spaceman/freesp.c | 1 - spaceman/init.c | 2 -- spaceman/prealloc.c | 1 - 4 files changed, 7 deletions(-)
spaceman/file.c +0 -3
@@ -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"
spaceman/freesp.c +0 -1
@@ -7,7 +7,6 @@*/ #include "libxfs.h" -#include <linux/fiemap.h> #include "command.h" #include "init.h" #include "path.h"
spaceman/init.c +0 -2
@@ -6,8 +6,6 @@#include "libxfs.h" #include "command.h" -#include "input.h" -#include "init.h" #include "path.h" #include "space.h"
spaceman/prealloc.c +0 -1
@@ -7,7 +7,6 @@#include "libxfs.h" #include "command.h" #include "input.h" -#include "init.h" #include "path.h" #include "space.h"
Signature · 1 line
1.8.3.1
Quoted 3 lines · Eric Sandeen
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.
Quoted 3 lines
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.
Signature · 2 lines
Dave Chinner [email protected]
Quoted 54 lines · Dave Chinner
Quoted 3 lines · Eric Sandeen
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 localWe 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.hincludesinit.h
libxfs/init.his 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.candutil.c.Quoted 3 lines
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 intoinclude/via symlinks. This is incomplete - stuff likeinclude/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 bylibxfs.horlibxfs_priv.h. And nothing external should need to pull in, say,xfs_format.horxfs_mount.h, because they are all pulled in byinclude/libxfs.h(which it mostly does already).
Quoted 4 lines
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.
estimate/xfs_estimate.c +0 -1
@@ -10,7 +10,6 @@* XXX: assumes dirv1 format. */ #include "libxfs.h" -#include <sys/stat.h> #include <ftw.h>
right?
Quoted 75 lines · Eric Sandeen
Quoted 54 lines · Dave Chinner
Quoted 3 lines · Eric Sandeen
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 localWe 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.hincludesinit.h
libxfs/init.his 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.candutil.c.Quoted 3 lines
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 intoinclude/via symlinks. This is incomplete - stuff likeinclude/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 bylibxfs.horlibxfs_priv.h. And nothing external should need to pull in, say,xfs_format.horxfs_mount.h, because they are all pulled in byinclude/libxfs.h(which it mostly does already).Quoted 4 lines
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.
estimate/xfs_estimate.c +0
-1@@ -10,7 +10,6 @@* XXX: assumes dirv1 format. */ #include "libxfs.h" -#include <sys/stat.h> #include <ftw.h>
Quoted 1 line
right?
*nod*
That sort of thing can easily be cleaned up.
-Dave.
Signature · 2 lines
Dave Chinner [email protected]
The whole series looks good to me: