All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Andrey Albershteyn <aalbersh@kernel.org>
Cc: linux-xfs@vger.kernel.org
Subject: [PATCH 4/8] libxfs: find a better location for stub headers
Date: Thu, 10 Sep 2026 15:28:34 +0200	[thread overview]
Message-ID: <20260910132840.1541283-5-hch@lst.de> (raw)
In-Reply-To: <20260910132840.1541283-1-hch@lst.de>

include/ currently has a few headers that files from fs/xfs/ in the kernel
with the same name.  We'll add a lot more of them, so move them to a
place not easily confused with public headers and clearly in the libxfs
realm by adding a libxfs/stubs/ directory.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 include/Makefile                      | 4 ----
 include/builddefs.in                  | 3 ++-
 libxfs/Makefile                       | 6 +++++-
 {include => libxfs/stubs}/xfs_inode.h | 0
 {include => libxfs/stubs}/xfs_mount.h | 0
 {include => libxfs/stubs}/xfs_trace.h | 0
 {include => libxfs/stubs}/xfs_trans.h | 0
 7 files changed, 7 insertions(+), 6 deletions(-)
 rename {include => libxfs/stubs}/xfs_inode.h (100%)
 rename {include => libxfs/stubs}/xfs_mount.h (100%)
 rename {include => libxfs/stubs}/xfs_trace.h (100%)
 rename {include => libxfs/stubs}/xfs_trans.h (100%)

diff --git a/include/Makefile b/include/Makefile
index a4f0c365db12..90614554b7bb 100644
--- a/include/Makefile
+++ b/include/Makefile
@@ -17,11 +17,7 @@ LIBHFILES = libxfs.h \
 	list.h \
 	parent.h \
 	spinlock.h \
-	xfs_inode.h \
 	xfs_metadump.h \
-	xfs_mount.h \
-	xfs_trace.h \
-	xfs_trans.h \
 	command.h \
 	input.h \
 	platform_defs.h
diff --git a/include/builddefs.in b/include/builddefs.in
index 3b52d1afd703..c8e0e0ae69e8 100644
--- a/include/builddefs.in
+++ b/include/builddefs.in
@@ -179,7 +179,8 @@ endif
 
 GCFLAGS = $(DEBUG) \
 	  -DVERSION=\"$(PKG_VERSION)\" -DLOCALEDIR=\"$(PKG_LOCALE_DIR)\"  \
-	  -DPACKAGE=\"$(PKG_NAME)\" -I$(TOPDIR)/include -I$(TOPDIR)/libxfs \
+	  -DPACKAGE=\"$(PKG_NAME)\" -I$(TOPDIR)/include \
+	  -I$(TOPDIR)/libxfs/stubs -I$(TOPDIR)/libxfs \
 	  -I$(TOPDIR)
 
 ifeq ($(ENABLE_GETTEXT),yes)
diff --git a/libxfs/Makefile b/libxfs/Makefile
index bd6b8f54d2ae..24ff07e961aa 100644
--- a/libxfs/Makefile
+++ b/libxfs/Makefile
@@ -73,7 +73,11 @@ HFILES = \
 	xfs_trans_resv.h \
 	xfs_trans_space.h \
 	xfs_dir2_priv.h \
-	xfs_zones.h
+	xfs_zones.h \
+	stubs/xfs_inode.h \
+	stubs/xfs_mount.h \
+	stubs/xfs_trace.h \
+	stubs/xfs_trans.h
 
 CFILES = buf_mem.c \
 	cache.c \
diff --git a/include/xfs_inode.h b/libxfs/stubs/xfs_inode.h
similarity index 100%
rename from include/xfs_inode.h
rename to libxfs/stubs/xfs_inode.h
diff --git a/include/xfs_mount.h b/libxfs/stubs/xfs_mount.h
similarity index 100%
rename from include/xfs_mount.h
rename to libxfs/stubs/xfs_mount.h
diff --git a/include/xfs_trace.h b/libxfs/stubs/xfs_trace.h
similarity index 100%
rename from include/xfs_trace.h
rename to libxfs/stubs/xfs_trace.h
diff --git a/include/xfs_trans.h b/libxfs/stubs/xfs_trans.h
similarity index 100%
rename from include/xfs_trans.h
rename to libxfs/stubs/xfs_trans.h
-- 
2.53.0


  parent reply	other threads:[~2026-09-10 13:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-10 13:28 reduce libxfs divergence from the kernel Christoph Hellwig
2026-09-10 13:28 ` [PATCH 1/8] include: fix LIBHFILES in Makefile Christoph Hellwig
2026-09-10 13:28 ` [PATCH 2/8] libxfs: remove a spurious xfs.h include in xfs_zones.c Christoph Hellwig
2026-09-10 13:28 ` [PATCH 3/8] libxfs: move a few xfs_health.h includes Christoph Hellwig
2026-09-10 13:28 ` Christoph Hellwig [this message]
2026-09-10 13:28 ` [PATCH 5/8] libxfs: rename buf_mem.h to xfs_buf_mem.h Christoph Hellwig
2026-09-10 13:28 ` [PATCH 6/8] libxfs: provide xfs_error.h Christoph Hellwig
2026-09-10 13:28 ` [PATCH 7/8] libxfs: provide xfs_extent_busy.h Christoph Hellwig
2026-09-10 13:28 ` [PATCH 8/8] libxfs: provide xfs_quota.h Christoph Hellwig
2026-09-10 15:39 ` reduce libxfs divergence from the kernel Andrey Albershteyn

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=20260910132840.1541283-5-hch@lst.de \
    --to=hch@lst.de \
    --cc=aalbersh@kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.