On Tue, Jul 14, 2020 at 02:46:19PM -0700, Darrick J. Wong wrote: > From: Darrick J. Wong <darrick.wong@xxxxxxxxxx> > > XFS_ALL_QUOTA_CHKD, being a OR of [UGP]QUOTA_CHKD, is a bitset of the > possible *incore* quota checked flags. This means that it cannot be > used in a comparison with the *ondisk* quota checked flags because V4 > filesystems set OQUOTA_CHKD, not the [GU]QUOTA_CHKD flags (which are V5 > flags). > > If you have a V4 filesystem with user quotas disabled but either group > or project quotas enabled, xfs_repair will /not/ claim that the quota > info will be regenerated on the next mount like it does in any other > situation. This is because the ondisk qflags field has OQUOTA_CHKD set > but repair fails to notice. > > Worse, if you have a V4 filesystem with user and group quotas enabled > and mild corruption, repair will claim that the quota info will be > regenerated. If you then mount the fs with only group quotas enabled, > quotacheck will not run to correct the data because repair failed to > clear OQUOTA_CHKD properly. > > These are fairly benign and unlikely scenarios, but when we add > quotacheck capabilities to xfs_repair, it will complain about the > incorrect quota counts, which causes regressions in xfs/278. Looks good, Reviewed-by: Christoph Hellwig <hch@xxxxxx>