summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirjhar Roy (IBM) <nirjhar.roy.lists@gmail.com>2026-02-20 09:53:59 +0300
committerCarlos Maiolino <cem@kernel.org>2026-02-25 15:58:49 +0300
commitac1d977096a17d56c55bd7f90be48e81ac4cec3f (patch)
treefea14e195e65ac429535b19592750247d8529dc4
parent8baa9bccc0156d6952d337bf17f57ce15902dfe4 (diff)
downloadlinux-ac1d977096a17d56c55bd7f90be48e81ac4cec3f.tar.xz
xfs: Add a comment in xfs_log_sb()
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 <hch@lst.de> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nirjhar Roy (IBM) <nirjhar.roy.lists@gmail.com> Signed-off-by: Carlos Maiolino <cem@kernel.org>
-rw-r--r--fs/xfs/libxfs/xfs_sb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_sb.c b/fs/xfs/libxfs/xfs_sb.c
index 38d16fe1f6d8..47322adb7690 100644
--- a/fs/xfs/libxfs/xfs_sb.c
+++ b/fs/xfs/libxfs/xfs_sb.c
@@ -1347,6 +1347,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 =