From: Nirjhar Roy (IBM) Date: Mon, 2 Mar 2026 01:40:01 +0000 (-0800) Subject: xfs: Add a comment in xfs_log_sb() X-Git-Tag: v7.0.0~64 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=806d742e6d03ab8b90f0e928a7c5fa2b76c8008f;p=xfsprogs-dev.git xfs: Add a comment in xfs_log_sb() Source kernel commit: ac1d977096a17d56c55bd7f90be48e81ac4cec3f Add a comment explaining why the sb_frextents are updated outside the if (xfs_has_lazycount(mp) check even though it is a lazycounter. RT groups are supported only in v5 filesystems which always have lazycounter enabled - so putting it inside the if(xfs_has_lazycount(mp) check is redundant. Suggested-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Nirjhar Roy (IBM) Signed-off-by: Carlos Maiolino --- diff --git a/libxfs/xfs_sb.c b/libxfs/xfs_sb.c index b29077dc..7a1d85b8 100644 --- a/libxfs/xfs_sb.c +++ b/libxfs/xfs_sb.c @@ -1345,6 +1345,9 @@ xfs_log_sb( * feature was introduced. This counter can go negative due to the way * we handle nearly-lockless reservations, so we must use the _positive * variant here to avoid writing out nonsense frextents. + * + * RT groups are only supported on v5 file systems, which always + * have lazy SB counters. */ if (xfs_has_rtgroups(mp) && !xfs_has_zoned(mp)) { mp->m_sb.sb_frextents =