linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Eric Sandeen <sandeen@redhat.com>
Cc: linux-xfs <linux-xfs@vger.kernel.org>
Subject: Re: [PATCH 2/2] libxfs: move header includes closer to kernelspace
Date: Wed, 22 Jan 2020 09:03:51 -0800	[thread overview]
Message-ID: <20200122170351.GT8247@magnolia> (raw)
In-Reply-To: <4d8501f5-4db1-9f46-bbf8-e2a7ae5726b6@redhat.com>

On Wed, Jan 22, 2020 at 10:48:51AM -0600, Eric Sandeen wrote:
> Aid application of future kernel patches which change #includes;
> not all headers exist in userspace so this is not a 1:1 match, but
> it brings userspace files a bit closer to kernelspace by adding all
> #includes which do match, and putting them in the same order.
> 
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>

Assuming gcc reviewed this and didn't barf up errors everywhere,
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

--D

> ---
> 
> diff --git a/libxfs/xfs_ag_resv.c b/libxfs/xfs_ag_resv.c
> index 1fe13bf4..530455a5 100644
> --- a/libxfs/xfs_ag_resv.c
> +++ b/libxfs/xfs_ag_resv.c
> @@ -7,10 +7,13 @@
>  #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_alloc.h"
> +#include "xfs_errortag.h"
>  #include "xfs_trace.h"
> +#include "xfs_trans.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 1d25d14f..ec233d0d 100644
> --- a/libxfs/xfs_alloc.c
> +++ b/libxfs/xfs_alloc.c
> @@ -17,6 +17,7 @@
>  #include "xfs_rmap.h"
>  #include "xfs_alloc_btree.h"
>  #include "xfs_alloc.h"
> +#include "xfs_errortag.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 d39c973a..57327deb 100644
> --- a/libxfs/xfs_alloc_btree.c
> +++ b/libxfs/xfs_alloc_btree.c
> @@ -7,6 +7,7 @@
>  #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"
> @@ -14,6 +15,7 @@
>  #include "xfs_alloc_btree.h"
>  #include "xfs_alloc.h"
>  #include "xfs_trace.h"
> +#include "xfs_trans.h"
>  
>  
>  STATIC struct xfs_btree_cur *
> diff --git a/libxfs/xfs_attr_leaf.c b/libxfs/xfs_attr_leaf.c
> index 7f11de3e..219736ac 100644
> --- a/libxfs/xfs_attr_leaf.c
> +++ b/libxfs/xfs_attr_leaf.c
> @@ -13,6 +13,7 @@
>  #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"
> diff --git a/libxfs/xfs_bmap.c b/libxfs/xfs_bmap.c
> index 0969f655..5efa2f0c 100644
> --- a/libxfs/xfs_bmap.c
> +++ b/libxfs/xfs_bmap.c
> @@ -20,6 +20,7 @@
>  #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_btree.c b/libxfs/xfs_btree.c
> index 08a7e4eb..aae1d30f 100644
> --- a/libxfs/xfs_btree.c
> +++ b/libxfs/xfs_btree.c
> @@ -14,7 +14,9 @@
>  #include "xfs_inode.h"
>  #include "xfs_trans.h"
>  #include "xfs_btree.h"
> +#include "xfs_errortag.h"
>  #include "xfs_trace.h"
> +#include "xfs_alloc.h"
>  
>  /*
>   * Cursor allocation zone.
> diff --git a/libxfs/xfs_defer.c b/libxfs/xfs_defer.c
> index cff27a9b..c7a536ac 100644
> --- a/libxfs/xfs_defer.c
> +++ b/libxfs/xfs_defer.c
> @@ -6,9 +6,13 @@
>  #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_trans.h"
> +#include "xfs_inode.h"
>  #include "xfs_trace.h"
>  
>  /*
> diff --git a/libxfs/xfs_dir2.c b/libxfs/xfs_dir2.c
> index 9a104a76..31ac89a3 100644
> --- a/libxfs/xfs_dir2.c
> +++ b/libxfs/xfs_dir2.c
> @@ -15,6 +15,7 @@
>  #include "xfs_bmap.h"
>  #include "xfs_dir2.h"
>  #include "xfs_dir2_priv.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_dquot_buf.c b/libxfs/xfs_dquot_buf.c
> index 4a175bc3..5b372a23 100644
> --- a/libxfs/xfs_dquot_buf.c
> +++ b/libxfs/xfs_dquot_buf.c
> @@ -8,9 +8,12 @@
>  #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_quota_defs.h"
> +#include "xfs_inode.h"
> +#include "xfs_trans.h"
>  
>  int
>  xfs_calc_dquots_per_chunk(
> diff --git a/libxfs/xfs_ialloc.c b/libxfs/xfs_ialloc.c
> index 23bcc8c9..baa99551 100644
> --- a/libxfs/xfs_ialloc.c
> +++ b/libxfs/xfs_ialloc.c
> @@ -17,6 +17,7 @@
>  #include "xfs_ialloc.h"
>  #include "xfs_ialloc_btree.h"
>  #include "xfs_alloc.h"
> +#include "xfs_errortag.h"
>  #include "xfs_bmap.h"
>  #include "xfs_trans.h"
>  #include "xfs_trace.h"
> diff --git a/libxfs/xfs_iext_tree.c b/libxfs/xfs_iext_tree.c
> index 568fb33b..f68091dc 100644
> --- a/libxfs/xfs_iext_tree.c
> +++ b/libxfs/xfs_iext_tree.c
> @@ -3,14 +3,14 @@
>   * Copyright (c) 2017 Christoph Hellwig.
>   */
>  
> -// #include <linux/cache.h>
> -// #include <linux/kernel.h>
> -// #include <linux/slab.h>
>  #include "libxfs_priv.h"
> +#include "xfs_shared.h"
>  #include "xfs_format.h"
>  #include "xfs_bit.h"
>  #include "xfs_log_format.h"
>  #include "xfs_inode.h"
> +#include "xfs_trans_resv.h"
> +#include "xfs_mount.h"
>  #include "xfs_trace.h"
>  
>  /*
> diff --git a/libxfs/xfs_inode_buf.c b/libxfs/xfs_inode_buf.c
> index 4c90e198..c0cb5676 100644
> --- a/libxfs/xfs_inode_buf.c
> +++ b/libxfs/xfs_inode_buf.c
> @@ -11,6 +11,7 @@
>  #include "xfs_trans_resv.h"
>  #include "xfs_mount.h"
>  #include "xfs_inode.h"
> +#include "xfs_errortag.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 a4b5686e..819faa63 100644
> --- a/libxfs/xfs_inode_fork.c
> +++ b/libxfs/xfs_inode_fork.c
> @@ -3,6 +3,7 @@
>   * Copyright (c) 2000-2006 Silicon Graphics, Inc.
>   * All Rights Reserved.
>   */
> +
>  #include "libxfs_priv.h"
>  #include "xfs_fs.h"
>  #include "xfs_shared.h"
> @@ -21,7 +22,6 @@
>  #include "xfs_dir2_priv.h"
>  #include "xfs_attr_leaf.h"
>  
> -
>  kmem_zone_t *xfs_ifork_zone;
>  
>  STATIC int xfs_iformat_local(xfs_inode_t *, xfs_dinode_t *, int, int);
> diff --git a/libxfs/xfs_refcount.c b/libxfs/xfs_refcount.c
> index 5149b0f7..71d29486 100644
> --- a/libxfs/xfs_refcount.c
> +++ b/libxfs/xfs_refcount.c
> @@ -15,6 +15,7 @@
>  #include "xfs_bmap.h"
>  #include "xfs_refcount_btree.h"
>  #include "xfs_alloc.h"
> +#include "xfs_errortag.h"
>  #include "xfs_trace.h"
>  #include "xfs_trans.h"
>  #include "xfs_bit.h"
> diff --git a/libxfs/xfs_refcount_btree.c b/libxfs/xfs_refcount_btree.c
> index a52b50c3..c1561325 100644
> --- a/libxfs/xfs_refcount_btree.c
> +++ b/libxfs/xfs_refcount_btree.c
> @@ -16,6 +16,7 @@
>  #include "xfs_alloc.h"
>  #include "xfs_trace.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 69a14d66..10a17e41 100644
> --- a/libxfs/xfs_rmap.c
> +++ b/libxfs/xfs_rmap.c
> @@ -18,6 +18,7 @@
>  #include "xfs_rmap.h"
>  #include "xfs_rmap_btree.h"
>  #include "xfs_trace.h"
> +#include "xfs_errortag.h"
>  #include "xfs_inode.h"
>  
>  /*
> diff --git a/libxfs/xfs_trans_resv.c b/libxfs/xfs_trans_resv.c
> index f0b48a7d..5f3279d4 100644
> --- a/libxfs/xfs_trans_resv.c
> +++ b/libxfs/xfs_trans_resv.c
> @@ -13,6 +13,7 @@
>  #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_trans.h"
>  #include "xfs_trans_space.h"
> 
> 

  reply	other threads:[~2020-01-22 17:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-22 16:38 [PATCH 0/2] xfsprogs: libxfs cosmetic tidyups Eric Sandeen
2020-01-22 16:41 ` [PATCH 1/2] xfsprogs: alphabetize libxfs_api_defs.h Eric Sandeen
2020-01-22 17:02   ` Darrick J. Wong
2020-01-25 23:14   ` Christoph Hellwig
2020-01-26 22:09     ` Darrick J. Wong
2020-01-27 15:28     ` Eric Sandeen
2020-01-22 16:48 ` [PATCH 2/2] libxfs: move header includes closer to kernelspace Eric Sandeen
2020-01-22 17:03   ` Darrick J. Wong [this message]
2020-01-25 23:15   ` Christoph Hellwig
2020-01-27 15:29     ` Eric Sandeen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200122170351.GT8247@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).