Skip to content

xfs: minor fixes to log recovery problems

Darrick J. Wong linux-xfs 1 version In review

Get series with b4
b4 am 162388773802.3427167.4556309820960423454.stgit@locust

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2xfs: fix log intent recovery ENOSPC shutdowns when inactivating inodesfs/xfs/xfs_mount.c+9 -11 reply
2/2xfs: force the log offline when log intent item recovery failsfs/xfs/xfs_log.c fs/xfs/xfs_log_recover.c+7 -11 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchChristoph Hellwig
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCHSET 0/2] xfs: minor fixes to log recovery problems

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(-)