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>
default:
break;
}
+ /* Metadata directory files are not counted in quotas. */
+ if (dip->di_version >= 3 &&
+ (dip->di_flags2 & cpu_to_be64(XFS_DIFLAG2_METADIR)))
+ ic = 0;
if (ic)
quota_add(&prid, &gid, &uid, 0, bc, ic, rc);
}
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);
if (proj_dquots)
qc_adjust(proj_dquots, ip->i_projid, blocks, rtblks);
+out_rele:
libxfs_irele(ip);
}