public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCHSET 0/9] xfs: continue removing defer item boilerplate
@ 2023-12-03 19:00 Darrick J. Wong
  2023-12-03 19:02 ` [PATCH 1/9] xfs: don't set XFS_TRANS_HAS_INTENT_DONE when there's no ATTRD log item Darrick J. Wong
                   ` (8 more replies)
  0 siblings, 9 replies; 26+ messages in thread
From: Darrick J. Wong @ 2023-12-03 19:00 UTC (permalink / raw)
  To: djwong, chandanbabu, hch; +Cc: linux-xfs

Hi all,

Now that we've restructured log intent item recovery to reconstruct the
incore deferred work state, apply further cleanups to that code to
remove boilerplate that is duplicated across all the _item.c files.
Having done that, collapse a bunch of trivial helpers to reduce the
overall call chain.  That enables us to refactor the relog code so that
the ->relog_item implementations only have to know how to format the
implementation-specific data encoded in an intent item and don't
themselves have to handle the log item juggling.

If you're going to start using this code, I strongly recommend pulling
from my git trees, which are linked below.

This has been lightly tested with fstests.  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=reconstruct-defer-cleanups-6.7
---
 fs/xfs/libxfs/xfs_defer.c  |   55 ++++++++++
 fs/xfs/libxfs/xfs_defer.h  |    3 +
 fs/xfs/xfs_attr_item.c     |  137 +++++++------------------
 fs/xfs/xfs_bmap_item.c     |  115 ++++++---------------
 fs/xfs/xfs_extfree_item.c  |  242 ++++++++++++++++----------------------------
 fs/xfs/xfs_refcount_item.c |  113 ++++++---------------
 fs/xfs/xfs_rmap_item.c     |  113 ++++++---------------
 fs/xfs/xfs_trans.h         |   10 --
 8 files changed, 284 insertions(+), 504 deletions(-)


^ permalink raw reply	[flat|nested] 26+ messages in thread
* [PATCHSET v2 0/9] xfs: continue removing defer item boilerplate
@ 2023-12-07  2:22 Darrick J. Wong
  2023-12-07  2:25 ` [PATCH 1/9] xfs: don't set XFS_TRANS_HAS_INTENT_DONE when there's no ATTRD log item Darrick J. Wong
  0 siblings, 1 reply; 26+ messages in thread
From: Darrick J. Wong @ 2023-12-07  2:22 UTC (permalink / raw)
  To: chandanbabu, hch, djwong; +Cc: linux-xfs

Hi all,

Now that we've restructured log intent item recovery to reconstruct the
incore deferred work state, apply further cleanups to that code to
remove boilerplate that is duplicated across all the _item.c files.
Having done that, collapse a bunch of trivial helpers to reduce the
overall call chain.  That enables us to refactor the relog code so that
the ->relog_item implementations only have to know how to format the
implementation-specific data encoded in an intent item and don't
themselves have to handle the log item juggling.

v2: pick up rvb tags

If you're going to start using this code, I strongly recommend pulling
from my git trees, which are linked below.

This has been lightly tested with fstests.  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=reconstruct-defer-cleanups-6.8
---
 fs/xfs/libxfs/xfs_defer.c  |   55 ++++++++++
 fs/xfs/libxfs/xfs_defer.h  |    3 +
 fs/xfs/xfs_attr_item.c     |  137 +++++++------------------
 fs/xfs/xfs_bmap_item.c     |  115 ++++++---------------
 fs/xfs/xfs_extfree_item.c  |  242 ++++++++++++++++----------------------------
 fs/xfs/xfs_refcount_item.c |  113 ++++++---------------
 fs/xfs/xfs_rmap_item.c     |  113 ++++++---------------
 fs/xfs/xfs_trans.h         |   10 --
 8 files changed, 284 insertions(+), 504 deletions(-)


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

end of thread, other threads:[~2023-12-07  2:25 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-03 19:00 [PATCHSET 0/9] xfs: continue removing defer item boilerplate Darrick J. Wong
2023-12-03 19:02 ` [PATCH 1/9] xfs: don't set XFS_TRANS_HAS_INTENT_DONE when there's no ATTRD log item Darrick J. Wong
2023-12-04  5:08   ` Christoph Hellwig
2023-12-04 18:43     ` Darrick J. Wong
2023-12-04 19:44       ` Christoph Hellwig
2023-12-04 20:34         ` Darrick J. Wong
2023-12-03 19:03 ` [PATCH 2/9] xfs: hoist intent done flag setting to ->finish_item callsite Darrick J. Wong
2023-12-04  5:10   ` Christoph Hellwig
2023-12-03 19:03 ` [PATCH 3/9] xfs: collapse the ->finish_item helpers Darrick J. Wong
2023-12-04  5:11   ` Christoph Hellwig
2023-12-03 19:03 ` [PATCH 4/9] xfs: hoist ->create_intent boilerplate to its callsite Darrick J. Wong
2023-12-04  5:11   ` Christoph Hellwig
2023-12-03 19:04 ` [PATCH 5/9] xfs: use xfs_defer_create_done for the relogging operation Darrick J. Wong
2023-12-04  5:19   ` Christoph Hellwig
2023-12-03 19:04 ` [PATCH 6/9] xfs: clean out XFS_LI_DIRTY setting boilerplate from ->iop_relog Darrick J. Wong
2023-12-04  5:20   ` Christoph Hellwig
2023-12-03 19:04 ` [PATCH 7/9] xfs: hoist xfs_trans_add_item calls to defer ops functions Darrick J. Wong
2023-12-04  5:21   ` Christoph Hellwig
2023-12-03 19:04 ` [PATCH 8/9] xfs: collapse the ->create_done functions Darrick J. Wong
2023-12-04  5:24   ` Christoph Hellwig
2023-12-04 18:51     ` Darrick J. Wong
2023-12-04 19:46       ` Christoph Hellwig
2023-12-04 20:02         ` Darrick J. Wong
2023-12-03 19:05 ` [PATCH 9/9] xfs: move ->iop_relog to struct xfs_defer_op_type Darrick J. Wong
2023-12-04  5:25   ` Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2023-12-07  2:22 [PATCHSET v2 0/9] xfs: continue removing defer item boilerplate Darrick J. Wong
2023-12-07  2:25 ` [PATCH 1/9] xfs: don't set XFS_TRANS_HAS_INTENT_DONE when there's no ATTRD log item Darrick J. Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox