Message ID | 163192863018.417887.1729794799105892028.stgit@magnolia (mailing list archive) |
---|---|
Headers | show |
Series | xfs: refactor log recovery resource capture | expand |
On 9/17/21 6:30 PM, Darrick J. Wong wrote: > 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 > Hi Darrick, Sorry to for the delay, thanks for putting this together. These improvements look good to me, I will see if I can get this worked in underneath delayed attrs and give it a test run. Allison > kernel git tree: > https://urldefense.com/v3/__https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=log-recovery-defer-capture-5.16__;!!ACWV5N9M2RV99hQ!ZyRkandC0OnbO6-EW6AVFwC62a54u8Ki6doYqvl2vJDfgBmkzB4GFZe5s25s8_0XfN1E$ > --- > 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(-) >