public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* fix recovery of allocator ops after a growfs
@ 2024-10-14  6:04 Christoph Hellwig
  2024-10-14  6:04 ` [PATCH 1/6] xfs: pass the exact range to initialize to xfs_initialize_perag Christoph Hellwig
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Christoph Hellwig @ 2024-10-14  6:04 UTC (permalink / raw)
  To: Carlos Maiolino; +Cc: Darrick J. Wong, Brian Foster, linux-xfs

Hi all,

auditing the perag code for the generic groups feature found an issue
where recovery of an extfree intent without a logged done entry will
fail when the log also contained the transaction that added the AG
to the extent is freed to because the file system geometry in the
superblock is only updated updated and the perag structures are only
created after log recovery has finished.

This version now also ensures the transactions using the new AGs
are not in the same CIL checkpoint as the growfs transaction.

Changes since v1:
 - rename old_agcount to orig_agcount in xlog_do_recover
 - remove a redundant check in xfs_initialize_perag
 - remove xlog_recover_update_agcount and fold it into the only caller
 - add a new patch to update the pag values for the last AG
 - add more detailed comments
 - dropped the changes to ensure post-growfs transactions touching the
   superblock are forced into their own checkpoint for now.  Based on
   reviews this needs a lot more work, and isn't needed to fix the known
   failing test. 

Diffstat:
 libxfs/xfs_ag.c        |   75 ++++++++++++++++++-------------------------------
 libxfs/xfs_ag.h        |   23 +++++++++------
 libxfs/xfs_alloc.c     |    4 +-
 xfs_buf_item_recover.c |   70 +++++++++++++++++++++++++++++++++++++++++++++
 xfs_fsops.c            |   20 +++++--------
 xfs_log_recover.c      |    7 ----
 xfs_mount.c            |    9 ++---
 7 files changed, 129 insertions(+), 79 deletions(-)

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

end of thread, other threads:[~2024-10-26  7:27 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-14  6:04 fix recovery of allocator ops after a growfs Christoph Hellwig
2024-10-14  6:04 ` [PATCH 1/6] xfs: pass the exact range to initialize to xfs_initialize_perag Christoph Hellwig
2024-10-15 13:11   ` Brian Foster
2024-10-15 13:35     ` Christoph Hellwig
2024-10-16  6:25     ` Christoph Hellwig
2024-10-14  6:04 ` [PATCH 2/6] xfs: merge the perag freeing helpers Christoph Hellwig
2024-10-14  6:04 ` [PATCH 3/6] xfs: update the file system geometry after recoverying superblock buffers Christoph Hellwig
2024-10-15 13:11   ` Brian Foster
2024-10-15 16:19   ` Darrick J. Wong
2024-10-14  6:04 ` [PATCH 4/6] xfs: error out when a superblock buffer update reduces the agcount Christoph Hellwig
2024-10-14  6:04 ` [PATCH 5/6] xfs: don't use __GFP_RETRY_MAYFAIL in xfs_initialize_perag Christoph Hellwig
2024-10-14  6:04 ` [PATCH 6/6] xfs: update the pag for the last AG at recovery time Christoph Hellwig
2024-10-15 13:11   ` Brian Foster
2024-10-15 13:37     ` Christoph Hellwig
2024-10-26  7:27 ` fix recovery of allocator ops after a growfs Carlos Maiolino

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