[PATCH 0/9] xfsprogs: handle the log correctly on v5 supers
Brian Foster
bfoster at redhat.com
Fri Aug 28 13:06:38 CDT 2015
Hi all,
Here's a first pass at a series to address the problem of repair putting
the current LSN behind existing metadata LSNs via log zeroing. The goal
is to detect when the current LSN is behind the maximum used metadata
LSN in the fs, for whatever reason, and reformat the log with a higher
cycle number when necessary. This is only lightly tested so far.
Patch 1 is a backport of the recently posted kernel patch with the
validation helper stubbed out. Patch 2 fills in the validation helper to
implement max metadata LSN tracking. Patches 3-5 clean up the record
logging code and add the ability to format the log to an arbitrary cycle
number. Patches 6-8 update xfs_repair to detect an improper current LSN
and reformat the log when necessary. Patch 9 updates xfs_repair to no
longer zero the log by default in phase 2.
Some notes:
- This series currently only considers xfs_repair. Other utilities might
have to be updated to handle the same problem.
- Right now this only uses verifiers for max metadata LSN tracking. I
don't believe this covers physical inodes, perhaps other data
structures..?
Thoughts, reviews, flames appreciated.
Brian
Brian Foster (9):
xfs: validate metadata LSNs against log on v5 superblocks
libxfs: track largest metadata LSN in use via verifiers
libxfs: don't hardcode cycle 1 into unmount op header
libxfs: pass lsn param to log clear and record header logging helpers
libxfs: add ability to clear log to arbitrary log cycle
xfs_repair: track log state throughout all recovery phases
xfs_repair: process the log in no_modify mode
xfs_repair: format the log with forward cycle number on v5 supers
xfs_repair: don't clear the log by default
copy/xfs_copy.c | 4 +-
db/sb.c | 2 +-
include/libxfs.h | 13 ++++--
include/xfs_mount.h | 6 +++
libxfs/libxfs_priv.h | 2 +
libxfs/rdwr.c | 106 ++++++++++++++++++++++++++++++++++++++------
libxfs/util.c | 40 +++++++++++++++++
libxfs/xfs_alloc.c | 10 ++++-
libxfs/xfs_attr_leaf.c | 3 ++
libxfs/xfs_btree.c | 18 +++++++-
libxfs/xfs_da_btree.c | 3 ++
libxfs/xfs_dir2_block.c | 2 +
libxfs/xfs_dir2_data.c | 2 +
libxfs/xfs_dir2_leaf.c | 2 +
libxfs/xfs_dir2_node.c | 2 +
libxfs/xfs_ialloc.c | 9 +++-
libxfs/xfs_sb.c | 9 ++++
libxfs/xfs_symlink_remote.c | 3 ++
mkfs/xfs_mkfs.c | 2 +-
repair/phase2.c | 83 ++++++++++++++++++++++------------
repair/xfs_repair.c | 78 ++++++++++++++++++++++++++++++--
21 files changed, 339 insertions(+), 60 deletions(-)
--
2.1.0
More information about the xfs
mailing list