All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 00/26] xfs: remove xfs_disk_quot from incore dquot
@ 2020-07-15  1:50 Darrick J. Wong
  2020-07-15  1:50 ` [PATCH 01/26] xfs: clear XFS_DQ_FREEING if we can't lock the dquot buffer to flush Darrick J. Wong
                   ` (25 more replies)
  0 siblings, 26 replies; 47+ messages in thread
From: Darrick J. Wong @ 2020-07-15  1:50 UTC (permalink / raw)
  To: darrick.wong
  Cc: Allison Collins, Christoph Hellwig, Brian Foster, Chandan Babu R,
	Dave Chinner, linux-xfs

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.

In v3 we separate the incore dquot's dq_flags fields into separate q_type
and q_flags fields, and introduce a new xfs_dqtype_t to make it obvious
when a function operates on a *single* quota type.  This also makes it
easier to validate that outside functions aren't going to screw up the
incore dquot state.

v4: merge the dquot type flags when possible.  I still plan to keep the
incore type/state flag namespace separate from the ondisk flags so that
I can add more flags to the ondisk dquot in the next series.

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   |   25 ++-
 fs/xfs/libxfs/xfs_format.h      |   36 +++-
 fs/xfs/libxfs/xfs_quota_defs.h  |   37 ++--
 fs/xfs/scrub/quota.c            |   86 ++++-----
 fs/xfs/scrub/repair.c           |   10 +
 fs/xfs/scrub/repair.h           |    4 
 fs/xfs/xfs_buf_item_recover.c   |    8 -
 fs/xfs/xfs_dquot.c              |  367 +++++++++++++++++++++------------------
 fs/xfs/xfs_dquot.h              |  119 ++++++++-----
 fs/xfs/xfs_dquot_item.c         |    8 +
 fs/xfs/xfs_dquot_item_recover.c |   12 +
 fs/xfs/xfs_icache.c             |    4 
 fs/xfs/xfs_iomap.c              |   42 ++--
 fs/xfs/xfs_qm.c                 |  196 ++++++++++-----------
 fs/xfs/xfs_qm.h                 |  104 +++++------
 fs/xfs/xfs_qm_bhv.c             |   22 +-
 fs/xfs/xfs_qm_syscalls.c        |  257 ++++++++++++++-------------
 fs/xfs/xfs_quota.h              |   10 +
 fs/xfs/xfs_quotaops.c           |   26 +--
 fs/xfs/xfs_trace.h              |  172 +++++++++++++++++-
 fs/xfs/xfs_trans_dquot.c        |  349 +++++++++++++++++++------------------
 21 files changed, 1059 insertions(+), 835 deletions(-)


^ permalink raw reply	[flat|nested] 47+ messages in thread
* [PATCH v3 00/26] xfs: remove xfs_disk_quot from incore dquot
@ 2020-07-14  1:31 Darrick J. Wong
  2020-07-14  1:32 ` [PATCH 05/26] xfs: split the incore dquot type into a separate field Darrick J. Wong
  0 siblings, 1 reply; 47+ messages in thread
From: Darrick J. Wong @ 2020-07-14  1:31 UTC (permalink / raw)
  To: darrick.wong
  Cc: Christoph Hellwig, Chandan Babu R, Allison Collins, Dave Chinner,
	Brian Foster, linux-xfs

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.

In v3 we separate the incore dquot's dq_flags fields into separate q_type
and q_flags fields, and introduce a new xfs_dqtype_t to make it obvious
when a function operates on a *single* quota type.  This also makes it
easier to validate that outside functions aren't going to screw up the
incore dquot state.

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   |   26 ++-
 fs/xfs/libxfs/xfs_format.h      |   29 +++
 fs/xfs/libxfs/xfs_quota_defs.h  |   54 ++++--
 fs/xfs/scrub/quota.c            |   86 +++------
 fs/xfs/scrub/repair.c           |   10 +
 fs/xfs/scrub/repair.h           |    4 
 fs/xfs/xfs_buf_item_recover.c   |    8 -
 fs/xfs/xfs_dquot.c              |  368 +++++++++++++++++++++------------------
 fs/xfs/xfs_dquot.h              |  119 ++++++++-----
 fs/xfs/xfs_dquot_item.c         |    8 +
 fs/xfs/xfs_dquot_item_recover.c |   12 +
 fs/xfs/xfs_icache.c             |    4 
 fs/xfs/xfs_iomap.c              |   42 ++--
 fs/xfs/xfs_qm.c                 |  196 ++++++++++-----------
 fs/xfs/xfs_qm.h                 |  104 +++++------
 fs/xfs/xfs_qm_bhv.c             |   22 +-
 fs/xfs/xfs_qm_syscalls.c        |  257 ++++++++++++++-------------
 fs/xfs/xfs_quota.h              |   10 +
 fs/xfs/xfs_quotaops.c           |   26 +--
 fs/xfs/xfs_trace.h              |  172 +++++++++++++++++-
 fs/xfs/xfs_trans_dquot.c        |  349 +++++++++++++++++++------------------
 21 files changed, 1075 insertions(+), 831 deletions(-)


^ permalink raw reply	[flat|nested] 47+ messages in thread

end of thread, other threads:[~2022-03-03  0:38 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-15  1:50 [PATCH v4 00/26] xfs: remove xfs_disk_quot from incore dquot Darrick J. Wong
2020-07-15  1:50 ` [PATCH 01/26] xfs: clear XFS_DQ_FREEING if we can't lock the dquot buffer to flush Darrick J. Wong
2020-07-15  1:50 ` [PATCH 02/26] xfs: fix inode quota reservation checks Darrick J. Wong
2020-07-15  1:50 ` [PATCH 03/26] xfs: validate ondisk/incore dquot flags Darrick J. Wong
2020-07-15 12:50   ` Chandan Babu R
2020-07-15  1:50 ` [PATCH 04/26] xfs: move the flags argument of xfs_qm_scall_trunc_qfiles to XFS_QMOPT_* Darrick J. Wong
2020-07-15 12:50   ` Chandan Babu R
2020-07-15  1:51 ` [PATCH 05/26] xfs: split the incore dquot type into a separate field Darrick J. Wong
2020-07-16  6:59   ` Chandan Babu R
2020-07-15  1:51 ` [PATCH 06/26] xfs: refactor quotacheck flags usage Darrick J. Wong
2020-07-16  6:59   ` Chandan Babu R
2020-07-15  1:51 ` [PATCH 07/26] xfs: rename dquot incore state flags Darrick J. Wong
2020-07-16  6:59   ` Chandan Babu R
2020-07-15  1:51 ` [PATCH 08/26] xfs: move the ondisk dquot flags to their own namespace Darrick J. Wong
2020-07-15  1:51 ` [PATCH 09/26] xfs: make XFS_DQUOT_CLUSTER_SIZE_FSB part of the ondisk format Darrick J. Wong
2020-07-20  5:37   ` Chandan Babu R
2020-07-15  1:51 ` [PATCH 10/26] xfs: stop using q_core.d_flags in the quota code Darrick J. Wong
2020-07-20  5:37   ` Chandan Babu R
2020-07-15  1:51 ` [PATCH 11/26] xfs: stop using q_core.d_id " Darrick J. Wong
2020-07-15  1:51 ` [PATCH 12/26] xfs: use a per-resource struct for incore dquot data Darrick J. Wong
2020-07-15  1:52 ` [PATCH 13/26] xfs: stop using q_core limits in the quota code Darrick J. Wong
2020-07-15  1:52 ` [PATCH 14/26] xfs: stop using q_core counters " Darrick J. Wong
2020-07-15  1:52 ` [PATCH 15/26] xfs: stop using q_core warning " Darrick J. Wong
2020-07-15  1:52 ` [PATCH 16/26] xfs: stop using q_core timers " Darrick J. Wong
2020-07-15  1:52 ` [PATCH 17/26] xfs: remove qcore from incore dquots Darrick J. Wong
2020-07-15  1:52 ` [PATCH 18/26] xfs: refactor default quota limits by resource Darrick J. Wong
2020-07-15  1:52 ` [PATCH 19/26] xfs: remove unnecessary arguments from quota adjust functions Darrick J. Wong
2020-07-15  1:52 ` [PATCH 20/26] xfs: refactor quota exceeded test Darrick J. Wong
2020-07-15  1:52 ` [PATCH 21/26] xfs: refactor xfs_qm_scall_setqlim Darrick J. Wong
2020-07-15  1:52 ` [PATCH 22/26] xfs: refactor xfs_trans_dqresv Darrick J. Wong
2020-07-15  1:53 ` [PATCH 23/26] xfs: refactor xfs_trans_apply_dquot_deltas Darrick J. Wong
2020-07-15  1:53 ` [PATCH 24/26] xfs: assume the default quota limits are always set in xfs_qm_adjust_dqlimits Darrick J. Wong
2020-07-20  5:38   ` Chandan Babu R
2020-07-15  1:53 ` [PATCH 25/26] xfs: actually bump warning counts when we send warnings Darrick J. Wong
2020-07-20  5:38   ` Chandan Babu R
2022-03-01 19:31   ` Quota warning woes (was: [PATCH 25/26] xfs: actually bump warning counts when we send warnings) Eric Sandeen
2022-03-02 18:19     ` Eric Sandeen
2022-03-03  0:38       ` Darrick J. Wong
2020-07-15  1:53 ` [PATCH 26/26] xfs: add more dquot tracepoints Darrick J. Wong
  -- strict thread matches above, loose matches on Subject: below --
2020-07-14  1:31 [PATCH v3 00/26] xfs: remove xfs_disk_quot from incore dquot Darrick J. Wong
2020-07-14  1:32 ` [PATCH 05/26] xfs: split the incore dquot type into a separate field Darrick J. Wong
2020-07-14  7:57   ` Christoph Hellwig
2020-07-14 18:05     ` Darrick J. Wong
2020-07-15 17:43       ` Christoph Hellwig
2020-07-15 18:38         ` Darrick J. Wong
2020-07-15 18:39           ` Christoph Hellwig
2020-07-15 21:20             ` Darrick J. Wong
2020-07-16  2:17               ` Darrick J. Wong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.