Linux XFS filesystem development
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: Andrey Albershteyn <aalbersh@kernel.org>,
	Eric Sandeen <sandeen@redhat.com>,
	Carlos Maiolino <cem@kernel.org>,
	linux-xfs@vger.kernel.org
Subject: Re: [PATCH 01/13] libxfs: use libxfs.h in xfs_platform.h
Date: Mon, 5 Oct 2026 14:44:19 -0700	[thread overview]
Message-ID: <20261005214419.GH2705364@frogsfrogsfrogs> (raw)
In-Reply-To: <20261005125637.1340355-2-hch@lst.de>

On Mon, Oct 05, 2026 at 02:56:11PM +0200, Christoph Hellwig wrote:
> xfs_platform.h duplicates a lot of the include chains and some of the
> definitions in include/libxfs.h.  Use that header from xfs_plaform.h and
> remove the duplication.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Seems fine to me to combine these, not sure why we didn't earlier...
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>

--D

> ---
>  libxfs/xfs_platform.h | 37 +------------------------------------
>  1 file changed, 1 insertion(+), 36 deletions(-)
> 
> diff --git a/libxfs/xfs_platform.h b/libxfs/xfs_platform.h
> index d09fb0aae00f..9aa898200da8 100644
> --- a/libxfs/xfs_platform.h
> +++ b/libxfs/xfs_platform.h
> @@ -37,33 +37,9 @@
>  #ifndef _XFS_PLATFORM_H
>  #define _XFS_PLATFORM_H
>  
> -/* CONFIG_XFS_* must be defined to 1 to work with IS_ENABLED() */
> -#define CONFIG_XFS_RT 1
> -#define CONFIG_XFS_BTREE_IN_MEM 1
> -
> -#include "libxfs_api_defs.h"
> -#include "platform_defs.h"
> -#include "xfs.h"
> -
> -#include "list.h"
> -#include "hlist.h"
> -#include "cache.h"
> -#include "bitops.h"
> -#include "kmem.h"
> -#include "libfrog/radix-tree.h"
> -#include "libfrog/bitmask.h"
> -#include "libfrog/div64.h"
> -#include "libfrog/util.h"
> -#include "atomic.h"
> -#include "spinlock.h"
> +#include "libxfs.h"
>  #include "linux-err.h"
>  
> -#include "xfs_types.h"
> -#include "xfs_arch.h"
> -
> -#include "xfs_fs.h"
> -#include "libfrog/crc32c.h"
> -
>  #include <sys/xattr.h>
>  
>  /* Zones used in libxfs allocations that aren't in shared header files */
> @@ -77,9 +53,6 @@ extern struct kmem_cache *xfs_trans_cache;
>  #define IOMAP_F_SHARED				0x04
>  #define xfs_bmbt_to_iomap(a, b, c, d, e, f)	((void) 0)
>  
> -/* CRC stuff, buffer API dependent on it */
> -#define crc32c(c,p,l)	crc32c_le((c),(unsigned char const *)(p),(l))
> -
>  /* fake up kernel's iomap, (not) used in xfs_bmap.[ch] */
>  struct iomap {
>  	unsigned long long	offset;	/* do not use */
> @@ -88,14 +61,6 @@ struct iomap {
>  
>  #define cancel_delayed_work_sync(work) do { } while(0)
>  
> -#include "xfs_cksum.h"
> -
> -/*
> - * This mirrors the kernel include for xfs_buf.h - it's implicitly included in
> - * every files via a similar include in the kernel xfs_linux.h.
> - */
> -#include "libxfs_io.h"
> -
>  /* for all the support code that uses progname in error messages */
>  extern char    *progname;
>  
> -- 
> 2.53.0
> 
> 

  reply	other threads:[~2026-10-05 21:44 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-05 12:56 reduce libxfs to kernel differences v2 Christoph Hellwig
2026-10-05 12:56 ` [PATCH 01/13] libxfs: use libxfs.h in xfs_platform.h Christoph Hellwig
2026-10-05 21:44   ` Darrick J. Wong [this message]
2026-10-05 12:56 ` [PATCH 02/13] libxfs: provide memalloc_nofs_{save,restore} stubs Christoph Hellwig
2026-10-05 21:45   ` Darrick J. Wong
2026-10-05 12:56 ` [PATCH 03/13] libxfs: remove a spurious xfs_rtbitmap.h include in xfs_sb.c Christoph Hellwig
2026-10-05 21:45   ` Darrick J. Wong
2026-10-05 12:56 ` [PATCH 04/13] libxfs: move the xfs_rtbitmap.h include in xfs_bmap.c Christoph Hellwig
2026-10-06 11:27   ` Andrey Albershteyn
2026-10-05 12:56 ` [PATCH 05/13] libxfs: remove the unused xfs_log_item.li_mountp field Christoph Hellwig
2026-10-05 21:46   ` Darrick J. Wong
2026-10-05 12:56 ` [PATCH 06/13] libxfs: remove the unused xfs_inode_log_item.ili_fsync_fields field Christoph Hellwig
2026-10-05 21:46   ` Darrick J. Wong
2026-10-05 12:56 ` [PATCH 07/13] libxfs: remove the xfs_log_item_t and xfs_buf_log_item_t typedefs Christoph Hellwig
2026-10-05 21:46   ` Darrick J. Wong
2026-10-05 12:56 ` [PATCH 08/13] libxfs: remove libxfs_trans_alloc_rollable Christoph Hellwig
2026-10-05 21:47   ` Darrick J. Wong
2026-10-05 12:56 ` [PATCH 09/13] libxfs: return int from xfs_buf_item_init Christoph Hellwig
2026-10-05 21:48   ` Darrick J. Wong
2026-10-05 12:56 ` [PATCH 10/13] libxfs: use xfs_buf_item.h and xfs_inode_item.h from the kernel source Christoph Hellwig
2026-10-05 21:48   ` Darrick J. Wong
2026-10-05 12:56 ` [PATCH 11/13] libxfs: cleanup xfs_trans.h Christoph Hellwig
2026-10-05 21:48   ` Darrick J. Wong
2026-10-05 12:56 ` [PATCH 12/13] libxfs: use xfs_trans.h from the kernel source Christoph Hellwig
2026-10-05 21:49   ` Darrick J. Wong
2026-10-07 13:41     ` Christoph Hellwig
2026-10-07 15:18       ` Darrick J. Wong
2026-10-08 10:59       ` Carlos Maiolino
2026-10-05 12:56 ` [PATCH 13/13] libxfs: use all log item headers from the kernel Christoph Hellwig
2026-10-05 21:50   ` Darrick J. Wong
  -- strict thread matches above, loose matches on Subject: below --
2026-09-25 15:20 reduce libxfs to kernel differences Christoph Hellwig
2026-09-25 15:20 ` [PATCH 01/13] libxfs: use libxfs.h in xfs_platform.h Christoph Hellwig

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=20261005214419.GH2705364@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=aalbersh@kernel.org \
    --cc=cem@kernel.org \
    --cc=hch@lst.de \
    --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