Hi all, Store the quota files in the metadata directory tree instead of the superblock. Since we're introducing a new incompat feature flag, let's also make the mount process bring up quotas in whatever state they were when the filesystem was last unmounted, instead of requiring sysadmins to remember that themselves. If you're going to start using this code, I strongly recommend pulling from my git trees, which are linked below. This has been running on the djcloud for months with no problems. 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=metadir-quotas xfsprogs git tree: https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=metadir-quotas fstests git tree: https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=metadir-quotas --- Commits in this patchset: * libfrog: scrub quota file metapaths * xfs_db: support metadir quotas * xfs_repair: refactor quota inumber handling * xfs_repair: hoist the secondary sb qflags handling * xfs_repair: support quota inodes in the metadata directory * xfs_repair: try not to trash qflags on metadir filesystems * mkfs: add quota flags when setting up filesystem --- db/dquot.c | 59 +++++++++++++---- include/xfs_mount.h | 1 libfrog/scrub.c | 20 ++++++ libxfs/init.c | 2 - libxfs/libxfs_api_defs.h | 6 ++ man/man8/mkfs.xfs.8.in | 48 ++++++++++++++ mkfs/xfs_mkfs.c | 113 ++++++++++++++++++++++++++++++++ repair/agheader.c | 161 +++++++++++++++++++++++++--------------------- repair/dinode.c | 18 +++-- repair/dir2.c | 12 ++- repair/globals.c | 111 ++++++++++++++++++++++++++++++-- repair/globals.h | 15 +++- repair/phase2.c | 3 + repair/phase4.c | 116 +++++++++++++++++---------------- repair/phase6.c | 128 +++++++++++++++++++++++++++++++++++-- repair/quotacheck.c | 118 ++++++++++++++++++++++++++++++---- repair/quotacheck.h | 3 + repair/sb.c | 3 + repair/versions.c | 9 +-- repair/xfs_repair.c | 13 +++- 20 files changed, 753 insertions(+), 206 deletions(-)