* convert all !XFS_RT stubs to inline functions
@ 2026-09-09 6:05 Christoph Hellwig
2026-09-09 6:05 ` [PATCH] xfs: " Christoph Hellwig
0 siblings, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2026-09-09 6:05 UTC (permalink / raw)
To: cem; +Cc: linux-xfs
Hi Carlos,
this is a fix for the ioctl cleanup series, which currently can cause a
warning for !XFS_RT builds with some compiler versions.
If you end up rebasing the 7.4 tree, it might make sense to thread it in
before that series.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] xfs: convert all !XFS_RT stubs to inline functions
2026-09-09 6:05 convert all !XFS_RT stubs to inline functions Christoph Hellwig
@ 2026-09-09 6:05 ` Christoph Hellwig
2026-09-09 18:52 ` Darrick J. Wong
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Christoph Hellwig @ 2026-09-09 6:05 UTC (permalink / raw)
To: cem; +Cc: linux-xfs
Avoid random compiler warnings about unused variables when CONFIG_XFS_RT
is not set.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
fs/xfs/xfs_rtalloc.h | 49 ++++++++++++++++++++++++++++++++++++++------
1 file changed, 43 insertions(+), 6 deletions(-)
diff --git a/fs/xfs/xfs_rtalloc.h b/fs/xfs/xfs_rtalloc.h
index 78a690b489ed..1d5108861acd 100644
--- a/fs/xfs/xfs_rtalloc.h
+++ b/fs/xfs/xfs_rtalloc.h
@@ -46,10 +46,34 @@ int xfs_rtalloc_reinit_frextents(struct xfs_mount *mp);
int xfs_growfs_check_rtgeom(const struct xfs_mount *mp, xfs_rfsblock_t dblocks,
xfs_rfsblock_t rblocks, xfs_agblock_t rextsize);
#else
-# define xfs_growfs_rt(mp,in) (-ENOSYS)
-# define xfs_rtalloc_reinit_frextents(m) (0)
-# define xfs_rtmount_readsb(mp) (0)
-# define xfs_rtmount_freesb(mp) ((void)0)
+static inline int
+xfs_growfs_rt(
+ struct xfs_mount *mp,
+ struct xfs_growfs_rt *in)
+{
+ return -ENOSYS;
+}
+
+static inline int
+xfs_rtalloc_reinit_frextents(
+ struct xfs_mount *mp)
+{
+ return 0;
+}
+
+static inline int
+xfs_rtmount_readsb(
+ struct xfs_mount *mp)
+{
+ return 0;
+}
+
+static inline void
+xfs_rtmount_freesb(
+ struct xfs_mount *mp)
+{
+}
+
static inline int /* error */
xfs_rtmount_init(
xfs_mount_t *mp) /* file system mount structure */
@@ -60,8 +84,21 @@ xfs_rtmount_init(
xfs_warn(mp, "Not built with CONFIG_XFS_RT");
return -ENOSYS;
}
-# define xfs_rtmount_inodes(m) (((mp)->m_sb.sb_rblocks == 0)? 0 : (-ENOSYS))
-# define xfs_rtunmount_inodes(m)
+
+static inline int
+xfs_rtmount_inodes(
+ struct xfs_mount *mp)
+{
+ if (mp->m_sb.sb_rblocks)
+ return -ENOSYS;
+ return 0;
+}
+
+static inline void
+xfs_rtunmount_inodes(
+ struct xfs_mount *mp)
+{
+}
static inline int
xfs_growfs_check_rtgeom(const struct xfs_mount *mp,
--
2.53.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] xfs: convert all !XFS_RT stubs to inline functions
2026-09-09 6:05 ` [PATCH] xfs: " Christoph Hellwig
@ 2026-09-09 18:52 ` Darrick J. Wong
2026-09-10 10:52 ` Carlos Maiolino
2026-09-11 7:27 ` Carlos Maiolino
2 siblings, 0 replies; 5+ messages in thread
From: Darrick J. Wong @ 2026-09-09 18:52 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: cem, linux-xfs
On Wed, Sep 09, 2026 at 09:05:26AM +0300, Christoph Hellwig wrote:
> Avoid random compiler warnings about unused variables when CONFIG_XFS_RT
> is not set.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Seems fine to me.
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
--D
> ---
> fs/xfs/xfs_rtalloc.h | 49 ++++++++++++++++++++++++++++++++++++++------
> 1 file changed, 43 insertions(+), 6 deletions(-)
>
> diff --git a/fs/xfs/xfs_rtalloc.h b/fs/xfs/xfs_rtalloc.h
> index 78a690b489ed..1d5108861acd 100644
> --- a/fs/xfs/xfs_rtalloc.h
> +++ b/fs/xfs/xfs_rtalloc.h
> @@ -46,10 +46,34 @@ int xfs_rtalloc_reinit_frextents(struct xfs_mount *mp);
> int xfs_growfs_check_rtgeom(const struct xfs_mount *mp, xfs_rfsblock_t dblocks,
> xfs_rfsblock_t rblocks, xfs_agblock_t rextsize);
> #else
> -# define xfs_growfs_rt(mp,in) (-ENOSYS)
> -# define xfs_rtalloc_reinit_frextents(m) (0)
> -# define xfs_rtmount_readsb(mp) (0)
> -# define xfs_rtmount_freesb(mp) ((void)0)
> +static inline int
> +xfs_growfs_rt(
> + struct xfs_mount *mp,
> + struct xfs_growfs_rt *in)
> +{
> + return -ENOSYS;
> +}
> +
> +static inline int
> +xfs_rtalloc_reinit_frextents(
> + struct xfs_mount *mp)
> +{
> + return 0;
> +}
> +
> +static inline int
> +xfs_rtmount_readsb(
> + struct xfs_mount *mp)
> +{
> + return 0;
> +}
> +
> +static inline void
> +xfs_rtmount_freesb(
> + struct xfs_mount *mp)
> +{
> +}
> +
> static inline int /* error */
> xfs_rtmount_init(
> xfs_mount_t *mp) /* file system mount structure */
> @@ -60,8 +84,21 @@ xfs_rtmount_init(
> xfs_warn(mp, "Not built with CONFIG_XFS_RT");
> return -ENOSYS;
> }
> -# define xfs_rtmount_inodes(m) (((mp)->m_sb.sb_rblocks == 0)? 0 : (-ENOSYS))
> -# define xfs_rtunmount_inodes(m)
> +
> +static inline int
> +xfs_rtmount_inodes(
> + struct xfs_mount *mp)
> +{
> + if (mp->m_sb.sb_rblocks)
> + return -ENOSYS;
> + return 0;
> +}
> +
> +static inline void
> +xfs_rtunmount_inodes(
> + struct xfs_mount *mp)
> +{
> +}
>
> static inline int
> xfs_growfs_check_rtgeom(const struct xfs_mount *mp,
> --
> 2.53.0
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] xfs: convert all !XFS_RT stubs to inline functions
2026-09-09 6:05 ` [PATCH] xfs: " Christoph Hellwig
2026-09-09 18:52 ` Darrick J. Wong
@ 2026-09-10 10:52 ` Carlos Maiolino
2026-09-11 7:27 ` Carlos Maiolino
2 siblings, 0 replies; 5+ messages in thread
From: Carlos Maiolino @ 2026-09-10 10:52 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-xfs
On Wed, Sep 09, 2026 at 09:05:26AM +0300, Christoph Hellwig wrote:
> Avoid random compiler warnings about unused variables when CONFIG_XFS_RT
> is not set.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> fs/xfs/xfs_rtalloc.h | 49 ++++++++++++++++++++++++++++++++++++++------
> 1 file changed, 43 insertions(+), 6 deletions(-)
This looks good.
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Regarding rebasing 7.4, we still have plenty of time to do that, I will
do it once Linus pulls in the next fixes so it won't mess up with hashes
on for-next. Then I can rebase 7.4 on top of the new -rc once the
patches gets in.
>
> diff --git a/fs/xfs/xfs_rtalloc.h b/fs/xfs/xfs_rtalloc.h
> index 78a690b489ed..1d5108861acd 100644
> --- a/fs/xfs/xfs_rtalloc.h
> +++ b/fs/xfs/xfs_rtalloc.h
> @@ -46,10 +46,34 @@ int xfs_rtalloc_reinit_frextents(struct xfs_mount *mp);
> int xfs_growfs_check_rtgeom(const struct xfs_mount *mp, xfs_rfsblock_t dblocks,
> xfs_rfsblock_t rblocks, xfs_agblock_t rextsize);
> #else
> -# define xfs_growfs_rt(mp,in) (-ENOSYS)
> -# define xfs_rtalloc_reinit_frextents(m) (0)
> -# define xfs_rtmount_readsb(mp) (0)
> -# define xfs_rtmount_freesb(mp) ((void)0)
> +static inline int
> +xfs_growfs_rt(
> + struct xfs_mount *mp,
> + struct xfs_growfs_rt *in)
> +{
> + return -ENOSYS;
> +}
> +
> +static inline int
> +xfs_rtalloc_reinit_frextents(
> + struct xfs_mount *mp)
> +{
> + return 0;
> +}
> +
> +static inline int
> +xfs_rtmount_readsb(
> + struct xfs_mount *mp)
> +{
> + return 0;
> +}
> +
> +static inline void
> +xfs_rtmount_freesb(
> + struct xfs_mount *mp)
> +{
> +}
> +
> static inline int /* error */
> xfs_rtmount_init(
> xfs_mount_t *mp) /* file system mount structure */
> @@ -60,8 +84,21 @@ xfs_rtmount_init(
> xfs_warn(mp, "Not built with CONFIG_XFS_RT");
> return -ENOSYS;
> }
> -# define xfs_rtmount_inodes(m) (((mp)->m_sb.sb_rblocks == 0)? 0 : (-ENOSYS))
> -# define xfs_rtunmount_inodes(m)
> +
> +static inline int
> +xfs_rtmount_inodes(
> + struct xfs_mount *mp)
> +{
> + if (mp->m_sb.sb_rblocks)
> + return -ENOSYS;
> + return 0;
> +}
> +
> +static inline void
> +xfs_rtunmount_inodes(
> + struct xfs_mount *mp)
> +{
> +}
>
> static inline int
> xfs_growfs_check_rtgeom(const struct xfs_mount *mp,
> --
> 2.53.0
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] xfs: convert all !XFS_RT stubs to inline functions
2026-09-09 6:05 ` [PATCH] xfs: " Christoph Hellwig
2026-09-09 18:52 ` Darrick J. Wong
2026-09-10 10:52 ` Carlos Maiolino
@ 2026-09-11 7:27 ` Carlos Maiolino
2 siblings, 0 replies; 5+ messages in thread
From: Carlos Maiolino @ 2026-09-11 7:27 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-xfs
On Wed, 09 Sep 2026 09:05:26 +0300, Christoph Hellwig wrote:
> Avoid random compiler warnings about unused variables when CONFIG_XFS_RT
> is not set.
>
>
Applied to for-next, thanks!
[1/1] xfs: convert all !XFS_RT stubs to inline functions
commit: ea089258eac7c53b593519a917d9f1671c632932
Best regards,
--
Carlos Maiolino <cem@kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-09-11 7:27 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-09 6:05 convert all !XFS_RT stubs to inline functions Christoph Hellwig
2026-09-09 6:05 ` [PATCH] xfs: " Christoph Hellwig
2026-09-09 18:52 ` Darrick J. Wong
2026-09-10 10:52 ` Carlos Maiolino
2026-09-11 7:27 ` Carlos Maiolino
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox