Linux XFS filesystem development
 help / color / mirror / Atom feed
* [PATCH 0/4] xfsprogs: fix xfs_healer build issues on older kernels
@ 2026-05-13 19:30 Anthony Iliopoulos
  2026-05-13 19:30 ` [PATCH 1/4] configure: always check for statmount supported_mask Anthony Iliopoulos
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Anthony Iliopoulos @ 2026-05-13 19:30 UTC (permalink / raw)
  To: linux-xfs

This patch series addresses several build issues that arise when
compiling xfs_healer on systems with older kernel headers. The patches
fix various problems, including missing statmount flag definitions,
incorrect configure checks, and missing stubs for statmount-related
functions. Additionally, the series updates .gitignore to ignore
xfs_healer-generated files.

Anthony Iliopoulos (4):
  configure: always check for statmount supported_mask
  libfrog: add missing statmount flag definitions
  libfrog: add fallback stubs for libfrog_statmount and fstatmount
  gitignore: add xfs_healer binaries and services

 .gitignore          |  3 +++
 configure.ac        |  2 +-
 libfrog/statmount.h | 22 +++++++++++++++++++++-
 3 files changed, 25 insertions(+), 2 deletions(-)

--
2.49.0

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/4] configure: always check for statmount supported_mask
  2026-05-13 19:30 [PATCH 0/4] xfsprogs: fix xfs_healer build issues on older kernels Anthony Iliopoulos
@ 2026-05-13 19:30 ` Anthony Iliopoulos
  2026-05-14  0:27   ` Darrick J. Wong
  2026-05-13 19:30 ` [PATCH 2/4] libfrog: add missing statmount flag definitions Anthony Iliopoulos
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Anthony Iliopoulos @ 2026-05-13 19:30 UTC (permalink / raw)
  To: linux-xfs

On systems with kernel headers older than v6.8 that preceed the addition
of the statmount syscall, have_listmount will be set to false and thus
checking of the statmount supported_mask is being skipped since the
check is currently conditional to listmount support.

This causes compilation failures since need_internal_statmount will not
be set, and thus struct statmount will not be available to xfs_healer.

Fix this by always checking for statmount supported_mask support even
when listmount is not available.

Signed-off-by: Anthony Iliopoulos <ailiop@suse.com>
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 2ac5e3d8181a..fe2ffddd9ec4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -192,8 +192,8 @@ AC_HAVE_CLOSE_RANGE
 AC_HAVE_LISTMOUNT
 if test "$have_listmount" = "yes"; then
 	AC_HAVE_LISTMOUNT_NS_FD
-	AC_HAVE_STATMOUNT_SUPPORTED_MASK
 fi
+AC_HAVE_STATMOUNT_SUPPORTED_MASK
 AC_HAVE_FANOTIFY_MOUNTINFO
 
 if test "$enable_ubsan" = "yes" || test "$enable_ubsan" = "probe"; then
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/4] libfrog: add missing statmount flag definitions
  2026-05-13 19:30 [PATCH 0/4] xfsprogs: fix xfs_healer build issues on older kernels Anthony Iliopoulos
  2026-05-13 19:30 ` [PATCH 1/4] configure: always check for statmount supported_mask Anthony Iliopoulos
@ 2026-05-13 19:30 ` Anthony Iliopoulos
  2026-05-14  0:27   ` Darrick J. Wong
  2026-05-13 19:30 ` [PATCH 3/4] libfrog: add fallback stubs for libfrog_statmount and fstatmount Anthony Iliopoulos
  2026-05-13 19:30 ` [PATCH 4/4] gitignore: add xfs_healer binaries and services Anthony Iliopoulos
  3 siblings, 1 reply; 9+ messages in thread
From: Anthony Iliopoulos @ 2026-05-13 19:30 UTC (permalink / raw)
  To: linux-xfs

Add definitions for STATMOUNT_MNT_BASIC and STATMOUNT_MNT_POINT to support
compilation of xfs_healer on systems with older kernel headers that predate
the statmount syscall (introduced in v6.8).

Signed-off-by: Anthony Iliopoulos <ailiop@suse.com>
---
 libfrog/statmount.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/libfrog/statmount.h b/libfrog/statmount.h
index 7e281ce93029..b6f1338830a0 100644
--- a/libfrog/statmount.h
+++ b/libfrog/statmount.h
@@ -52,6 +52,14 @@ struct statmount {
 
 /* all the new flags added since the beginning of statmount */
 
+#ifndef STATMOUNT_MNT_BASIC
+#define STATMOUNT_MNT_BASIC		0x00000002U     /* Want/got mnt_... */
+#endif
+
+#ifndef STATMOUNT_MNT_POINT
+#define STATMOUNT_MNT_POINT		0x00000010U     /* Want/got mnt_point */
+#endif
+
 #ifndef STATMOUNT_MNT_NS_ID
 #define STATMOUNT_MNT_NS_ID		0x00000040U	/* Want/got mnt_ns_id */
 #endif
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/4] libfrog: add fallback stubs for libfrog_statmount and fstatmount
  2026-05-13 19:30 [PATCH 0/4] xfsprogs: fix xfs_healer build issues on older kernels Anthony Iliopoulos
  2026-05-13 19:30 ` [PATCH 1/4] configure: always check for statmount supported_mask Anthony Iliopoulos
  2026-05-13 19:30 ` [PATCH 2/4] libfrog: add missing statmount flag definitions Anthony Iliopoulos
@ 2026-05-13 19:30 ` Anthony Iliopoulos
  2026-05-14  0:29   ` Darrick J. Wong
  2026-05-13 19:30 ` [PATCH 4/4] gitignore: add xfs_healer binaries and services Anthony Iliopoulos
  3 siblings, 1 reply; 9+ messages in thread
From: Anthony Iliopoulos @ 2026-05-13 19:30 UTC (permalink / raw)
  To: linux-xfs

Add stubs for libfrog_statmount and fstatmount to enable compilation of
xfs_healer on systems that lack listmount support. Without these stubs,
statmount.c is not compiled, causing compilation errors due to missing
definitions. The stubs allow xfs_healer to fall back to walking the mount
table in userspace.

Signed-off-by: Anthony Iliopoulos <ailiop@suse.com>
---
 libfrog/statmount.h | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/libfrog/statmount.h b/libfrog/statmount.h
index b6f1338830a0..13aaad3a99dc 100644
--- a/libfrog/statmount.h
+++ b/libfrog/statmount.h
@@ -98,11 +98,23 @@ struct statmount {
 int libfrog_listmount(uint64_t mnt_id, int mnt_ns_fd, uint64_t *cursor,
 		uint64_t *mnt_ids, size_t nr_mnt_ids);
 
+#ifdef HAVE_LISTMOUNT
 int libfrog_statmount(uint64_t mnt_id, int mnt_ns_fd, uint64_t statmount_flags,
 		struct statmount *smbuf, size_t smbuf_size);
-
 int libfrog_fstatmount(int fd, uint64_t statmount_flags,
 		struct statmount *smbuf, size_t smbuf_size);
+#else
+static inline int libfrog_statmount(uint64_t mnt_id, int mnt_ns_fd, uint64_t statmount_flags,
+		struct statmount *smbuf, size_t smbuf_size)
+{
+	return -ENOSYS;
+}
+static inline int libfrog_fstatmount(int fd, uint64_t statmount_flags,
+		struct statmount *smbuf, size_t smbuf_size)
+{
+	return -ENOSYS;
+}
+#endif
 
 static inline size_t libfrog_statmount_sizeof(size_t strings_bytes)
 {
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 4/4] gitignore: add xfs_healer binaries and services
  2026-05-13 19:30 [PATCH 0/4] xfsprogs: fix xfs_healer build issues on older kernels Anthony Iliopoulos
                   ` (2 preceding siblings ...)
  2026-05-13 19:30 ` [PATCH 3/4] libfrog: add fallback stubs for libfrog_statmount and fstatmount Anthony Iliopoulos
@ 2026-05-13 19:30 ` Anthony Iliopoulos
  2026-05-14  0:28   ` Darrick J. Wong
  3 siblings, 1 reply; 9+ messages in thread
From: Anthony Iliopoulos @ 2026-05-13 19:30 UTC (permalink / raw)
  To: linux-xfs

Update gitignore with the various binaries and services that have been
introduced by xfs_healer.

Signed-off-by: Anthony Iliopoulos <ailiop@suse.com>
---
 .gitignore | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/.gitignore b/.gitignore
index 6867d669c93d..eb3decd108be 100644
--- a/.gitignore
+++ b/.gitignore
@@ -60,6 +60,9 @@ cscope.*
 /estimate/xfs_estimate
 /fsr/xfs_fsr
 /growfs/xfs_growfs
+/healer/xfs_healer
+/healer/xfs_healer_start
+/healer/*.service
 /io/xfs_io
 /logprint/xfs_logprint
 /mdrestore/xfs_mdrestore
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/4] configure: always check for statmount supported_mask
  2026-05-13 19:30 ` [PATCH 1/4] configure: always check for statmount supported_mask Anthony Iliopoulos
@ 2026-05-14  0:27   ` Darrick J. Wong
  0 siblings, 0 replies; 9+ messages in thread
From: Darrick J. Wong @ 2026-05-14  0:27 UTC (permalink / raw)
  To: Anthony Iliopoulos; +Cc: linux-xfs

On Wed, May 13, 2026 at 09:30:37PM +0200, Anthony Iliopoulos wrote:
> On systems with kernel headers older than v6.8 that preceed the addition
> of the statmount syscall, have_listmount will be set to false and thus
> checking of the statmount supported_mask is being skipped since the
> check is currently conditional to listmount support.

ahah, that's why it doesn't build on Mageia 9, I gather.

> This causes compilation failures since need_internal_statmount will not
> be set, and thus struct statmount will not be available to xfs_healer.
> 
> Fix this by always checking for statmount supported_mask support even
> when listmount is not available.
> 
> Signed-off-by: Anthony Iliopoulos <ailiop@suse.com>
> ---
>  configure.ac | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 2ac5e3d8181a..fe2ffddd9ec4 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -192,8 +192,8 @@ AC_HAVE_CLOSE_RANGE
>  AC_HAVE_LISTMOUNT
>  if test "$have_listmount" = "yes"; then
>  	AC_HAVE_LISTMOUNT_NS_FD
> -	AC_HAVE_STATMOUNT_SUPPORTED_MASK
>  fi
> +AC_HAVE_STATMOUNT_SUPPORTED_MASK

Yeah, we should test both.  Sorry about the braino there. :/
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>

--D

>  AC_HAVE_FANOTIFY_MOUNTINFO
>  
>  if test "$enable_ubsan" = "yes" || test "$enable_ubsan" = "probe"; then
> -- 
> 2.49.0
> 
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/4] libfrog: add missing statmount flag definitions
  2026-05-13 19:30 ` [PATCH 2/4] libfrog: add missing statmount flag definitions Anthony Iliopoulos
@ 2026-05-14  0:27   ` Darrick J. Wong
  0 siblings, 0 replies; 9+ messages in thread
From: Darrick J. Wong @ 2026-05-14  0:27 UTC (permalink / raw)
  To: Anthony Iliopoulos; +Cc: linux-xfs

On Wed, May 13, 2026 at 09:30:38PM +0200, Anthony Iliopoulos wrote:
> Add definitions for STATMOUNT_MNT_BASIC and STATMOUNT_MNT_POINT to support
> compilation of xfs_healer on systems with older kernel headers that predate
> the statmount syscall (introduced in v6.8).
> 
> Signed-off-by: Anthony Iliopoulos <ailiop@suse.com>

Looks good to me,
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>

--D

> ---
>  libfrog/statmount.h | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/libfrog/statmount.h b/libfrog/statmount.h
> index 7e281ce93029..b6f1338830a0 100644
> --- a/libfrog/statmount.h
> +++ b/libfrog/statmount.h
> @@ -52,6 +52,14 @@ struct statmount {
>  
>  /* all the new flags added since the beginning of statmount */
>  
> +#ifndef STATMOUNT_MNT_BASIC
> +#define STATMOUNT_MNT_BASIC		0x00000002U     /* Want/got mnt_... */
> +#endif
> +
> +#ifndef STATMOUNT_MNT_POINT
> +#define STATMOUNT_MNT_POINT		0x00000010U     /* Want/got mnt_point */
> +#endif
> +
>  #ifndef STATMOUNT_MNT_NS_ID
>  #define STATMOUNT_MNT_NS_ID		0x00000040U	/* Want/got mnt_ns_id */
>  #endif
> -- 
> 2.49.0
> 
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 4/4] gitignore: add xfs_healer binaries and services
  2026-05-13 19:30 ` [PATCH 4/4] gitignore: add xfs_healer binaries and services Anthony Iliopoulos
@ 2026-05-14  0:28   ` Darrick J. Wong
  0 siblings, 0 replies; 9+ messages in thread
From: Darrick J. Wong @ 2026-05-14  0:28 UTC (permalink / raw)
  To: Anthony Iliopoulos; +Cc: linux-xfs

On Wed, May 13, 2026 at 09:30:40PM +0200, Anthony Iliopoulos wrote:
> Update gitignore with the various binaries and services that have been
> introduced by xfs_healer.
> 
> Signed-off-by: Anthony Iliopoulos <ailiop@suse.com>

Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>

--D

> ---
>  .gitignore | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/.gitignore b/.gitignore
> index 6867d669c93d..eb3decd108be 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -60,6 +60,9 @@ cscope.*
>  /estimate/xfs_estimate
>  /fsr/xfs_fsr
>  /growfs/xfs_growfs
> +/healer/xfs_healer
> +/healer/xfs_healer_start
> +/healer/*.service
>  /io/xfs_io
>  /logprint/xfs_logprint
>  /mdrestore/xfs_mdrestore
> -- 
> 2.49.0
> 
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 3/4] libfrog: add fallback stubs for libfrog_statmount and fstatmount
  2026-05-13 19:30 ` [PATCH 3/4] libfrog: add fallback stubs for libfrog_statmount and fstatmount Anthony Iliopoulos
@ 2026-05-14  0:29   ` Darrick J. Wong
  0 siblings, 0 replies; 9+ messages in thread
From: Darrick J. Wong @ 2026-05-14  0:29 UTC (permalink / raw)
  To: Anthony Iliopoulos; +Cc: linux-xfs

On Wed, May 13, 2026 at 09:30:39PM +0200, Anthony Iliopoulos wrote:
> Add stubs for libfrog_statmount and fstatmount to enable compilation of
> xfs_healer on systems that lack listmount support. Without these stubs,
> statmount.c is not compiled, causing compilation errors due to missing
> definitions. The stubs allow xfs_healer to fall back to walking the mount
> table in userspace.
> 
> Signed-off-by: Anthony Iliopoulos <ailiop@suse.com>

Seems fine to me, though I wonder if we should just bite the bullet and
have a separate HAVE_STATMOUNT?

(Eh, maybe when we develop a need for one without the other)

Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>

--D

> ---
>  libfrog/statmount.h | 14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)
> 
> diff --git a/libfrog/statmount.h b/libfrog/statmount.h
> index b6f1338830a0..13aaad3a99dc 100644
> --- a/libfrog/statmount.h
> +++ b/libfrog/statmount.h
> @@ -98,11 +98,23 @@ struct statmount {
>  int libfrog_listmount(uint64_t mnt_id, int mnt_ns_fd, uint64_t *cursor,
>  		uint64_t *mnt_ids, size_t nr_mnt_ids);
>  
> +#ifdef HAVE_LISTMOUNT
>  int libfrog_statmount(uint64_t mnt_id, int mnt_ns_fd, uint64_t statmount_flags,
>  		struct statmount *smbuf, size_t smbuf_size);
> -
>  int libfrog_fstatmount(int fd, uint64_t statmount_flags,
>  		struct statmount *smbuf, size_t smbuf_size);
> +#else
> +static inline int libfrog_statmount(uint64_t mnt_id, int mnt_ns_fd, uint64_t statmount_flags,
> +		struct statmount *smbuf, size_t smbuf_size)
> +{
> +	return -ENOSYS;
> +}
> +static inline int libfrog_fstatmount(int fd, uint64_t statmount_flags,
> +		struct statmount *smbuf, size_t smbuf_size)
> +{
> +	return -ENOSYS;
> +}
> +#endif
>  
>  static inline size_t libfrog_statmount_sizeof(size_t strings_bytes)
>  {
> -- 
> 2.49.0
> 
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-05-14  0:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-13 19:30 [PATCH 0/4] xfsprogs: fix xfs_healer build issues on older kernels Anthony Iliopoulos
2026-05-13 19:30 ` [PATCH 1/4] configure: always check for statmount supported_mask Anthony Iliopoulos
2026-05-14  0:27   ` Darrick J. Wong
2026-05-13 19:30 ` [PATCH 2/4] libfrog: add missing statmount flag definitions Anthony Iliopoulos
2026-05-14  0:27   ` Darrick J. Wong
2026-05-13 19:30 ` [PATCH 3/4] libfrog: add fallback stubs for libfrog_statmount and fstatmount Anthony Iliopoulos
2026-05-14  0:29   ` Darrick J. Wong
2026-05-13 19:30 ` [PATCH 4/4] gitignore: add xfs_healer binaries and services Anthony Iliopoulos
2026-05-14  0:28   ` Darrick J. Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox