]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_repair: do not count metadata directory files when doing quotacheck
authorDarrick J. Wong <djwong@kernel.org>
Thu, 21 Nov 2024 00:24:21 +0000 (16:24 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 24 Dec 2024 02:01:28 +0000 (18:01 -0800)
Previously, we stated that files in the metadata directory tree are not
counted in the dquot information.  Fix the offline quotacheck code in
xfs_repair and xfs_check to reflect this.

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

index d9e08059927f80cecf43908e6b4517ae81ec05f8..11e2d64eb3479108374f653f4912bc3e63d116f4 100644 (file)
@@ -217,6 +217,10 @@ quotacheck_adjust(
                return;
        }
 
+       /* Metadata directory files aren't counted in quota. */
+       if (xfs_is_metadir_inode(ip))
+               goto out_rele;
+
        /* Count the file's blocks. */
        if (XFS_IS_REALTIME_INODE(ip))
                rtblks = qc_count_rtblocks(ip);
@@ -229,6 +233,7 @@ quotacheck_adjust(
        if (proj_dquots)
                qc_adjust(proj_dquots, ip->i_projid, blocks, rtblks);
 
+out_rele:
        libxfs_irele(ip);
 }