Skip to content

Commit 13af229

Browse files
author
Darrick J. Wong
committed
xfs: do not count metadata directory files when doing online quotacheck
Previously, we stated that files in the metadata directory tree are not counted in the dquot information. Fix the online quotacheck code to reflect this. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
1 parent 679b098 commit 13af229

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

fs/xfs/scrub/quotacheck.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,10 +398,13 @@ xqcheck_collect_inode(
398398
bool isreg = S_ISREG(VFS_I(ip)->i_mode);
399399
int error = 0;
400400

401-
if (xfs_is_quota_inode(&tp->t_mountp->m_sb, ip->i_ino)) {
401+
if (xfs_is_metadir_inode(ip) ||
402+
xfs_is_quota_inode(&tp->t_mountp->m_sb, ip->i_ino)) {
402403
/*
403404
* Quota files are never counted towards quota, so we do not
404-
* need to take the lock.
405+
* need to take the lock. Files do not switch between the
406+
* metadata and regular directory trees without a reallocation,
407+
* so we do not need to ILOCK them either.
405408
*/
406409
xchk_iscan_mark_visited(&xqc->iscan, ip);
407410
return 0;

0 commit comments

Comments
 (0)