From: Darrick J. Wong Date: Wed, 3 Jul 2024 21:21:56 +0000 (-0700) Subject: xfs_repair: do not count metadata directory files when doing quotacheck X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=b45175bd3fd3480a7606cf5523942cac3031b74f;p=users%2Fhch%2Fxfsprogs.git xfs_repair: do not count metadata directory files when doing quotacheck 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 --- diff --git a/repair/quotacheck.c b/repair/quotacheck.c index 4cb38db3d..3abcd8ae9 100644 --- a/repair/quotacheck.c +++ b/repair/quotacheck.c @@ -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); }