Hi all, This series uses the inode scanner and live update hook functionality introduced in the last patchset to implement quotacheck on a live filesystem. The quotacheck scrubber builds an incore copy of the dquot resource usage counters and compares it to the live dquots to report discrepancies. If the user chooses to repair the quota counters, the repair function visits each incore dquot to update the counts from the live information. The live update hooks are key to keeping the incore copy up to date. If you're going to start using this mess, you probably ought to just pull from my git trees, which are linked below. This is an extraordinary way to destroy everything. Enjoy! Comments and questions are, as always, welcome. --D kernel git tree: https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=repair-quotacheck xfsprogs git tree: https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=repair-quotacheck fstests git tree: https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=repair-quotacheck --- fs/xfs/Makefile | 2 fs/xfs/libxfs/xfs_fs.h | 4 fs/xfs/libxfs/xfs_health.h | 4 fs/xfs/scrub/common.c | 47 ++ fs/xfs/scrub/common.h | 11 fs/xfs/scrub/health.c | 1 fs/xfs/scrub/quotacheck.c | 840 ++++++++++++++++++++++++++++++++++++++ fs/xfs/scrub/quotacheck.h | 76 +++ fs/xfs/scrub/quotacheck_repair.c | 254 +++++++++++ fs/xfs/scrub/repair.c | 46 ++ fs/xfs/scrub/repair.h | 5 fs/xfs/scrub/scrub.c | 9 fs/xfs/scrub/scrub.h | 10 fs/xfs/scrub/trace.h | 32 + fs/xfs/scrub/xfarray.h | 19 + fs/xfs/xfs_health.c | 1 fs/xfs/xfs_inode.c | 21 + fs/xfs/xfs_inode.h | 3 fs/xfs/xfs_qm.c | 23 + fs/xfs/xfs_qm.h | 16 + fs/xfs/xfs_qm_bhv.c | 1 fs/xfs/xfs_quota.h | 45 ++ fs/xfs/xfs_trans_dquot.c | 158 +++++++ 23 files changed, 1604 insertions(+), 24 deletions(-) create mode 100644 fs/xfs/scrub/quotacheck.c create mode 100644 fs/xfs/scrub/quotacheck.h create mode 100644 fs/xfs/scrub/quotacheck_repair.c