All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHSET 0/2] xfs: minor fixes to log recovery problems
@ 2021-06-16 23:55 Darrick J. Wong
  2021-06-16 23:55 ` [PATCH 1/2] xfs: fix log intent recovery ENOSPC shutdowns when inactivating inodes Darrick J. Wong
  2021-06-16 23:55 ` [PATCH 2/2] xfs: force the log offline when log intent item recovery fails Darrick J. Wong
  0 siblings, 2 replies; 5+ messages in thread
From: Darrick J. Wong @ 2021-06-16 23:55 UTC (permalink / raw)
  To: djwong; +Cc: linux-xfs

Hi all,

This series fixes a couple of bugs that I found in log recovery.  The
first problem is that we don't reserve space for per-AG btree expansion
when we inactivate inodes during log recovery.  If a file with shared
blocks were to be unlinked, this can result in transaction failure
because inactivation assumes that it doesn't need to reserve blocks to
free files and cannot handle a refcount btree expansion.

The second problem addressed here is that if log recovery fails due to
something that doesn't directly impact the log (like ENOSPC during
transaction allocation, or ENOMEM allocating buffers) it will leave the
log running, which means that it writes an unmount record after recovery
fails.  The /next/ mount will see a clean log and start running, even
though the metadata isn't consistent.

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-fixes-5.14
---
 fs/xfs/xfs_log.c         |    3 +++
 fs/xfs/xfs_log_recover.c |    5 ++++-
 fs/xfs/xfs_mount.c       |   10 +++++++++-
 3 files changed, 16 insertions(+), 2 deletions(-)


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

end of thread, other threads:[~2021-06-17  8:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-16 23:55 [PATCHSET 0/2] xfs: minor fixes to log recovery problems Darrick J. Wong
2021-06-16 23:55 ` [PATCH 1/2] xfs: fix log intent recovery ENOSPC shutdowns when inactivating inodes Darrick J. Wong
2021-06-17  8:12   ` Christoph Hellwig
2021-06-16 23:55 ` [PATCH 2/2] xfs: force the log offline when log intent item recovery fails Darrick J. Wong
2021-06-17  8:14   ` Christoph Hellwig

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.