mbox series

[v2,00/22] xfs: remove xfs_disk_quot from incore dquot

Message ID 159398715269.425236.15910213189856396341.stgit@magnolia (mailing list archive)
Headers show
Series xfs: remove xfs_disk_quot from incore dquot | expand

Message

Darrick J. Wong July 5, 2020, 10:12 p.m. UTC
Hi all,

This series replaces q_core (the ondisk quota structure) in the incore
dquot structure with a quota resource control structure containing the
count, reservation, limits, timers, and warnings.  Each dquot gets three
of these resource control structures (blocks, inodes, rt blocks).

Doing this enables us to remove a whole lot of noisy endian conversions
in the quota code, and enables us to refactor a bunch of open-coded
logic to pass around pointers to quota resource control structs.

Note that these cleanups are a prerequisite for the bigtime patchset, as
it depends on incore quota timers being time64_t to take advantage of
the 64-bit time functions in the kernel with fewer places to trip over
the ondisk format.

In v2 we do some more work cleaning up the d_flags/dq_flags mess,
finally add the dquot cluster size to the ondisk format declarations
(because the cluster size actually /does/ affect that), shorten some of
the long names from v1, and fix quota warning count having been broken
for years.

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=remove-quota-qcore

xfsprogs git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=remove-quota-qcore
---
 fs/xfs/libxfs/xfs_dquot_buf.c   |   15 +-
 fs/xfs/libxfs/xfs_format.h      |   28 +++
 fs/xfs/libxfs/xfs_quota_defs.h  |    6 -
 fs/xfs/scrub/quota.c            |   69 +++-----
 fs/xfs/xfs_dquot.c              |  289 +++++++++++++++++++---------------
 fs/xfs/xfs_dquot.h              |   54 +++++-
 fs/xfs/xfs_dquot_item.c         |    8 +
 fs/xfs/xfs_dquot_item_recover.c |    4 
 fs/xfs/xfs_iomap.c              |    6 -
 fs/xfs/xfs_qm.c                 |  113 +++++++------
 fs/xfs/xfs_qm.h                 |   51 ++----
 fs/xfs/xfs_qm_bhv.c             |   20 +-
 fs/xfs/xfs_qm_syscalls.c        |  231 ++++++++++++++-------------
 fs/xfs/xfs_quotaops.c           |   12 +
 fs/xfs/xfs_trace.h              |  160 +++++++++++++++++--
 fs/xfs/xfs_trans_dquot.c        |  330 ++++++++++++++++++++-------------------
 16 files changed, 798 insertions(+), 598 deletions(-)