From: Christoph Hellwig <hch@lst.de>
To: Andrey Albershteyn <aalbersh@kernel.org>
Cc: linux-xfs@vger.kernel.org
Subject: [PATCH 5/8] libxfs: rename buf_mem.h to xfs_buf_mem.h
Date: Thu, 10 Sep 2026 15:28:35 +0200 [thread overview]
Message-ID: <20260910132840.1541283-6-hch@lst.de> (raw)
In-Reply-To: <20260910132840.1541283-1-hch@lst.de>
Give the file the same name as in the kernel to avoid spurious include
differences. Also include xfile.h as in the kernel to avoid further
spurious differences.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
include/libxfs.h | 3 +--
libxfs/Makefile | 2 +-
libxfs/buf_mem.c | 3 +--
libxfs/init.c | 3 +--
libxfs/rdwr.c | 3 +--
libxfs/{buf_mem.h => stubs/xfs_buf_mem.h} | 2 ++
libxfs/xfs_btree.c | 3 +--
libxfs/xfs_btree_mem.c | 3 +--
libxfs/xfs_rmap_btree.c | 3 +--
libxfs/xfs_rtrmap_btree.c | 3 +--
10 files changed, 11 insertions(+), 17 deletions(-)
rename libxfs/{buf_mem.h => stubs/xfs_buf_mem.h} (97%)
diff --git a/include/libxfs.h b/include/libxfs.h
index 68d1f351f700..7f0c22ef4991 100644
--- a/include/libxfs.h
+++ b/include/libxfs.h
@@ -92,8 +92,7 @@ struct iomap;
#include "xfs_btree_staging.h"
#include "xfs_rtbitmap.h"
#include "xfs_symlink_remote.h"
-#include "libxfs/xfile.h"
-#include "libxfs/buf_mem.h"
+#include "xfs_buf_mem.h"
#include "xfs_btree_mem.h"
#include "xfs_parent.h"
#include "xfs_ag_resv.h"
diff --git a/libxfs/Makefile b/libxfs/Makefile
index 24ff07e961aa..7af5db81b0c3 100644
--- a/libxfs/Makefile
+++ b/libxfs/Makefile
@@ -29,7 +29,6 @@ HFILES = \
xfs_platform.h \
linux-err.h \
topology.h \
- buf_mem.h \
xfblob.h \
xfile.h \
xfs_ag_resv.h \
@@ -74,6 +73,7 @@ HFILES = \
xfs_trans_space.h \
xfs_dir2_priv.h \
xfs_zones.h \
+ stubs/xfs_buf_mem.h \
stubs/xfs_inode.h \
stubs/xfs_mount.h \
stubs/xfs_trace.h \
diff --git a/libxfs/buf_mem.c b/libxfs/buf_mem.c
index 15c61966db43..3c8452de9689 100644
--- a/libxfs/buf_mem.c
+++ b/libxfs/buf_mem.c
@@ -5,8 +5,7 @@
*/
#include "xfs_platform.h"
#include "libxfs.h"
-#include "libxfs/xfile.h"
-#include "libxfs/buf_mem.h"
+#include "xfs_buf_mem.h"
#include <sys/mman.h>
#include <sys/types.h>
#include <sys/wait.h>
diff --git a/libxfs/init.c b/libxfs/init.c
index 5d8b4a153e28..b89c9fe360d4 100644
--- a/libxfs/init.c
+++ b/libxfs/init.c
@@ -22,10 +22,9 @@
#include "xfs_rmap_btree.h"
#include "xfs_refcount_btree.h"
#include "xfs_metafile.h"
+#include "xfs_buf_mem.h"
#include "libfrog/platform.h"
#include "libfrog/util.h"
-#include "libxfs/xfile.h"
-#include "libxfs/buf_mem.h"
#include "xfs_format.h"
#include "xfs_da_format.h"
diff --git a/libxfs/rdwr.c b/libxfs/rdwr.c
index 6c57bedef548..90f2d56687ca 100644
--- a/libxfs/rdwr.c
+++ b/libxfs/rdwr.c
@@ -17,9 +17,8 @@
#include "xfs_inode_fork.h"
#include "xfs_inode.h"
#include "xfs_trans.h"
+#include "xfs_buf_mem.h"
#include "libfrog/platform.h"
-#include "libxfs/xfile.h"
-#include "libxfs/buf_mem.h"
#include "libxfs.h"
static void libxfs_brelse(struct cache_node *node);
diff --git a/libxfs/buf_mem.h b/libxfs/stubs/xfs_buf_mem.h
similarity index 97%
rename from libxfs/buf_mem.h
rename to libxfs/stubs/xfs_buf_mem.h
index 6e4b2d3503b8..98564e67d5bd 100644
--- a/libxfs/buf_mem.h
+++ b/libxfs/stubs/xfs_buf_mem.h
@@ -6,6 +6,8 @@
#ifndef __XFS_BUF_MEM_H__
#define __XFS_BUF_MEM_H__
+#include "xfile.h"
+
extern unsigned int XMBUF_BLOCKSIZE;
extern unsigned int XMBUF_BLOCKSHIFT;
diff --git a/libxfs/xfs_btree.c b/libxfs/xfs_btree.c
index ec77f325aab6..fe565b84903c 100644
--- a/libxfs/xfs_btree.c
+++ b/libxfs/xfs_btree.c
@@ -25,8 +25,7 @@
#include "xfs_rmap_btree.h"
#include "xfs_refcount_btree.h"
#include "xfs_health.h"
-#include "xfile.h"
-#include "buf_mem.h"
+#include "xfs_buf_mem.h"
#include "xfs_btree_mem.h"
#include "xfs_rtrmap_btree.h"
#include "xfs_bmap.h"
diff --git a/libxfs/xfs_btree_mem.c b/libxfs/xfs_btree_mem.c
index 5fa4a9787c99..d65be63df88c 100644
--- a/libxfs/xfs_btree_mem.c
+++ b/libxfs/xfs_btree_mem.c
@@ -12,8 +12,7 @@
#include "xfs_mount.h"
#include "xfs_trans.h"
#include "xfs_btree.h"
-#include "xfile.h"
-#include "buf_mem.h"
+#include "xfs_buf_mem.h"
#include "xfs_btree_mem.h"
#include "xfs_ag.h"
#include "xfs_trace.h"
diff --git a/libxfs/xfs_rmap_btree.c b/libxfs/xfs_rmap_btree.c
index f63d2df45070..98b16dc83f84 100644
--- a/libxfs/xfs_rmap_btree.c
+++ b/libxfs/xfs_rmap_btree.c
@@ -20,8 +20,7 @@
#include "xfs_trace.h"
#include "xfs_ag.h"
#include "xfs_ag_resv.h"
-#include "xfile.h"
-#include "buf_mem.h"
+#include "xfs_buf_mem.h"
#include "xfs_btree_mem.h"
static struct kmem_cache *xfs_rmapbt_cur_cache;
diff --git a/libxfs/xfs_rtrmap_btree.c b/libxfs/xfs_rtrmap_btree.c
index 7fbe6c19c454..091221743b8a 100644
--- a/libxfs/xfs_rtrmap_btree.c
+++ b/libxfs/xfs_rtrmap_btree.c
@@ -26,8 +26,7 @@
#include "xfs_rtgroup.h"
#include "xfs_bmap.h"
#include "xfs_health.h"
-#include "xfile.h"
-#include "buf_mem.h"
+#include "xfs_buf_mem.h"
#include "xfs_btree_mem.h"
static struct kmem_cache *xfs_rtrmapbt_cur_cache;
--
2.53.0
next prev 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 ` [PATCH 4/8] libxfs: find a better location for stub headers Christoph Hellwig
2026-09-10 13:28 ` Christoph Hellwig [this message]
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-6-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.