]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: disable sb_frextents for zoned file systems
authorChristoph Hellwig <hch@lst.de>
Mon, 14 Apr 2025 05:35:58 +0000 (07:35 +0200)
committerAndrey Albershteyn <aalbersh@kernel.org>
Tue, 29 Apr 2025 16:09:57 +0000 (18:09 +0200)
Source kernel commit: 1d319ac6fe1bd6364c5fc6e285ac47b117aed117

Zoned file systems not only don't use the global frextents counter, but
for them the in-memory percpu counter also includes reservations taken
before even allocating delalloc extent records, so it will never match
the per-zone used information.  Disable all updates and verification of
the sb counter for zoned file systems as it isn't useful for them.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
libxfs/xfs_sb.c

index 8344b40e4ab922e1d7e9a966ae4aede70136c039..8df99e518c703e5906b1b1dc5964c38012f06793 100644 (file)
@@ -1330,7 +1330,7 @@ xfs_log_sb(
         * we handle nearly-lockless reservations, so we must use the _positive
         * variant here to avoid writing out nonsense frextents.
         */
-       if (xfs_has_rtgroups(mp)) {
+       if (xfs_has_rtgroups(mp) && !xfs_has_zoned(mp)) {
                mp->m_sb.sb_frextents =
                                xfs_sum_freecounter(mp, XC_FREE_RTEXTENTS);
        }