]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfsprogs-dev.git/commitdiff
xfs_scrub: don't count internal log space in the data device used count
authorDarrick J. Wong <djwong@kernel.org>
Thu, 4 Jun 2026 06:06:09 +0000 (23:06 -0700)
committerAndrey Albershteyn <aalbersh@kernel.org>
Thu, 11 Jun 2026 10:26:04 +0000 (12:26 +0200)
Internal logs are not considered free space, so for the data device
they've already been subtracted from xfs_fsop_counts::freedata by
XFS_IOC_FSCOUNTS.  This causes overcounting in the phase 7 reporting.

Cc: linux-xfs@vger.kernel.org # v7.0.0
Fixes: 95a92c5cecb2e1 ("xfs_scrub: perform media scanning of the log region")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Andrey Albershteyn <aalbersh@kernel.org>
scrub/phase7.c

index d52c142cc36114bcec3ac6de10892d489f0a156c..e16ca28aa28371fe886f9f8c8bf6f303674ebbc3 100644 (file)
@@ -244,10 +244,6 @@ phase7_func(
        stat_data = totalcount.dbytes;
        stat_rt = totalcount.rbytes;
 
-       /* only count internal logs for data device summary */
-       if (!ctx->fsinfo.fs_log)
-               used_data += cvt_off_fsb_to_b(&ctx->mnt, l_blocks);
-
        /*
         * Complain if the counts are off by more than 10% unless
         * the inaccuracy is less than 32MB worth of blocks or 100 inodes.