diff mbox series

xfs: don't return an error from xfs_update_last_rtgroup_size for !XFS_RT

Message ID 20241217042737.1755365-1-hch@lst.de (mailing list archive)
State New
Headers show
Series xfs: don't return an error from xfs_update_last_rtgroup_size for !XFS_RT | expand

Commit Message

Christoph Hellwig Dec. 17, 2024, 4:27 a.m. UTC
Non-rtg file systems have a fake RT group even if they do not have a RT
device, and thus an rgcount of 1.  Ensure xfs_update_last_rtgroup_size
doesn't fail when called for !XFS_RT to handle this case.

Fixes: 87fe4c34a383 ("xfs: create incore realtime group structures")
Reported-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/xfs/libxfs/xfs_rtgroup.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Darrick J. Wong Dec. 17, 2024, 6:19 a.m. UTC | #1
On Tue, Dec 17, 2024 at 05:27:35AM +0100, Christoph Hellwig wrote:
> Non-rtg file systems have a fake RT group even if they do not have a RT
> device, and thus an rgcount of 1.  Ensure xfs_update_last_rtgroup_size
> doesn't fail when called for !XFS_RT to handle this case.
> 
> Fixes: 87fe4c34a383 ("xfs: create incore realtime group structures")
> Reported-by: Brian Foster <bfoster@redhat.com>
> Signed-off-by: Christoph Hellwig <hch@lst.de>

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

--D

> ---
>  fs/xfs/libxfs/xfs_rtgroup.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/xfs/libxfs/xfs_rtgroup.h b/fs/xfs/libxfs/xfs_rtgroup.h
> index 7e7e491ff06f..2d7822644eff 100644
> --- a/fs/xfs/libxfs/xfs_rtgroup.h
> +++ b/fs/xfs/libxfs/xfs_rtgroup.h
> @@ -272,7 +272,7 @@ static inline int xfs_initialize_rtgroups(struct xfs_mount *mp,
>  }
>  
>  # define xfs_rtgroup_extents(mp, rgno)		(0)
> -# define xfs_update_last_rtgroup_size(mp, rgno)	(-EOPNOTSUPP)
> +# define xfs_update_last_rtgroup_size(mp, rgno)	(0)
>  # define xfs_rtgroup_lock(rtg, gf)		((void)0)
>  # define xfs_rtgroup_unlock(rtg, gf)		((void)0)
>  # define xfs_rtgroup_trans_join(tp, rtg, gf)	((void)0)
> -- 
> 2.45.2
>
diff mbox series

Patch

diff --git a/fs/xfs/libxfs/xfs_rtgroup.h b/fs/xfs/libxfs/xfs_rtgroup.h
index 7e7e491ff06f..2d7822644eff 100644
--- a/fs/xfs/libxfs/xfs_rtgroup.h
+++ b/fs/xfs/libxfs/xfs_rtgroup.h
@@ -272,7 +272,7 @@  static inline int xfs_initialize_rtgroups(struct xfs_mount *mp,
 }
 
 # define xfs_rtgroup_extents(mp, rgno)		(0)
-# define xfs_update_last_rtgroup_size(mp, rgno)	(-EOPNOTSUPP)
+# define xfs_update_last_rtgroup_size(mp, rgno)	(0)
 # define xfs_rtgroup_lock(rtg, gf)		((void)0)
 # define xfs_rtgroup_unlock(rtg, gf)		((void)0)
 # define xfs_rtgroup_trans_join(tp, rtg, gf)	((void)0)