From: "Darrick J. Wong" <djwong@kernel.org>
To: Anthony Iliopoulos <ailiop@suse.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 3/4] libfrog: add fallback stubs for libfrog_statmount and fstatmount
Date: Wed, 13 May 2026 17:29:37 -0700 [thread overview]
Message-ID: <20260514002937.GU9555@frogsfrogsfrogs> (raw)
In-Reply-To: <20260513193040.2130-4-ailiop@suse.com>
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
>
>
next prev parent reply other threads:[~2026-05-14 0:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
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=20260514002937.GU9555@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=ailiop@suse.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox