linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHSET RFC achender 0/2] xfs: refactor log recovery resource capture
@ 2021-09-18  1:30 Darrick J. Wong
  2021-09-18  1:30 ` [PATCH 1/2] xfs: formalize the process of holding onto resources across a defer roll Darrick J. Wong
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Darrick J. Wong @ 2021-09-18  1:30 UTC (permalink / raw)
  To: djwong, allison.henderson; +Cc: linux-xfs

Hi all,

During review of Allison's logged xattrs patchset last cycle, I noticed
that there was an opportunity to clean up some code structure
differences between how regular runtime deferred attributes hold on to
resources across a transaction roll, and how it's done during log
recovery.  This series, in cleaning that up, should shorten her
patchset and simplify it a bit.

During regular operation, transactions are allowed to hold up to two
inodes and two buffers across a transaction roll to finish deferred log
items.  This implies that log recovery of a log intent item ought to be
able to do the same.  However, current log recovery code open-codes
saving only a single inode, because that was all that was required.

With atomic extent swapping and logged extended attributes upon us, it
has become evident that we need to use the same runtime mechanisms
during recovery.  Refactor the deferred ops code to use the same
resource capture mechanisms for both.

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=log-recovery-defer-capture-5.16
---
 fs/xfs/libxfs/xfs_defer.c  |  171 +++++++++++++++++++++++++++++++-------------
 fs/xfs/libxfs/xfs_defer.h  |   38 ++++++++--
 fs/xfs/xfs_bmap_item.c     |    2 -
 fs/xfs/xfs_extfree_item.c  |    2 -
 fs/xfs/xfs_log_recover.c   |   12 +--
 fs/xfs/xfs_refcount_item.c |    2 -
 fs/xfs/xfs_rmap_item.c     |    2 -
 fs/xfs/xfs_trans.h         |    6 --
 8 files changed, 157 insertions(+), 78 deletions(-)


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

end of thread, other threads:[~2021-09-27 20:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-18  1:30 [PATCHSET RFC achender 0/2] xfs: refactor log recovery resource capture Darrick J. Wong
2021-09-18  1:30 ` [PATCH 1/2] xfs: formalize the process of holding onto resources across a defer roll Darrick J. Wong
2021-09-27 20:38   ` Allison Henderson
2021-09-18  1:30 ` [PATCH 2/2] xfs: port the defer ops capture and continue to resource capture Darrick J. Wong
2021-09-27 20:26   ` Allison Henderson
2021-09-27 20:26   ` Allison Henderson
2021-09-27 20:26 ` [PATCHSET RFC achender 0/2] xfs: refactor log recovery " Allison Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).