Skip to content

xfsprogs: format the log correctly on v5 supers

Brian Foster linux-xfs 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest18 patches 0 repliesNew
  2. v212 patches 10 repliesSuperseded
  3. v19 patches 0 repliesSuperseded

Changes in v3 from the cover letter

- Rebased on latest LSN validation kernel patch.
- Added comment for dummy log clearing tid.
- Seed max lsn value from initial log state in xfs_repair.
- Added xfs_copy fixes (non-dup. dirty log fix + v5 log format fixes).
v2: http://oss.sgi.com/pipermail/xfs/2015-September/043630.html
- Rebase to latest kernel variant of invalid metadata LSN detection.
- Added support for xfs_db's uuid command and xfs_metadump.
v1: http://oss.sgi.com/pipermail/xfs/2015-August/043397.html

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/18libxfs: validate metadata LSNs against log on v5 superblockslibxfs/libxfs_priv.h libxfs/util.c libxfs/xfs_alloc.c +10 more+65 -70 replies
2/18libxfs: track largest metadata LSN in use via verifiersinclude/libxfs.h libxfs/util.c+34 -00 replies
3/18libxfs: don't hardcode cycle 1 into unmount op headerlibxfs/rdwr.c+17 -70 replies
4/18libxfs: pass lsn param to log clear and record header logging helperscopy/xfs_copy.c db/sb.c include/libxfs.h +3 more+33 -150 replies
5/18libxfs: add ability to clear log to arbitrary log cyclelibxfs/rdwr.c+60 -80 replies
6/18libxlog: pull struct xlog out of xlog_is_dirty()db/metadump.c db/sb.c include/libxlog.h +1 more+26 -220 replies
7/18xfs_repair: track log state throughout all recovery phasesinclude/xfs_mount.h repair/phase2.c repair/xfs_repair.c+32 -160 replies
8/18xfs_repair: process the log in no_modify moderepair/phase2.c+6 -50 replies
9/18xfs_repair: format the log with forward cycle number on v5 supersrepair/xfs_repair.c+68 -20 replies
10/18xfs_repair: don't clear the log by defaultrepair/phase2.c+40 -200 replies
11/18xfs_repair: seed the max lsn from log state in phase 2repair/phase2.c+7 -00 replies
12/18xfs_db: do not reset current lsn from uuid command on v5 supersdb/init.c db/sb.c+29 -150 replies
13/18db/metadump: bump lsn when log is cleared on v5 supersdb/metadump.c db/sb.c include/libxfs.h +4 more+72 -270 replies
14/18xfs_copy: check for dirty log on non-duplicate copiesMakefile copy/Makefile copy/xfs_copy.c+36 -30 replies
15/18xfs_copy: genericize write helper to facilitate separate log bufcopy/xfs_copy.c+20 -140 replies
16/18xfs_copy: store data buf alignment in buf data structurecopy/xfs_copy.c copy/xfs_copy.h+2 -00 replies
17/18xfs_copy: refactor log format code into new helpercopy/xfs_copy.c+45 -240 replies
18/18xfs_copy: format v5 sb logs correctlycopy/xfs_copy.c+59 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 00/18] xfsprogs: format the log correctly on v5 supers

Hi all,

Here is v3 of the userspace v5 log formatting fixes. This version is based on the latest variant of the kernel metadata LSN verification patch:

http://oss.sgi.com/pipermail/xfs/2015-September/043846.html

The updates are relatively minor with the exception of added support for xfs_copy. Patches 1-6 update libxfs/libxlog to support max. metadata LSN tracking, cycle-specific log formatting and otherwise prepare for subsequent fixes. Patches 7-11 update xfs_repair to no longer zero the log by default and format v5 logs correctly based on the maximum seen metadata LSN. Patches 12-13 update the xfs_db uuid and metadump commands to bump the cycle number when formatting v5 logs. Patch 14 is an independent bug fix to enable xfs_copy to detect and warn about a dirty log in the source filesystem. Patches 15-18 refactor and fix xfs_copy to also bump the cycle number when formatting v5 logs.

Thoughts, reviews, flames appreciated.

Brian

v3:
- Rebased on latest LSN validation kernel patch.
- Added comment for dummy log clearing tid.
- Seed max lsn value from initial log state in xfs_repair.
- Added xfs_copy fixes (non-dup. dirty log fix + v5 log format fixes).
v2: http://oss.sgi.com/pipermail/xfs/2015-September/043630.html
- Rebase to latest kernel variant of invalid metadata LSN detection.
- Added support for xfs_db's uuid command and xfs_metadump.
v1: http://oss.sgi.com/pipermail/xfs/2015-August/043397.html

Brian Foster (18):
libxfs: 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
libxlog: pull struct xlog out of xlog_is_dirty()
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
xfs_repair: seed the max lsn from log state in phase 2
xfs_db: do not reset current lsn from uuid command on v5 supers db/metadump: bump lsn when log is cleared on v5 supers
xfs_copy: check for dirty log on non-duplicate copies
xfs_copy: genericize write helper to facilitate separate log buf
xfs_copy: store data buf alignment in buf data structure
xfs_copy: refactor log format code into new helper
xfs_copy: format v5 sb logs correctly

 Makefile                    |   2 +-
 copy/Makefile               |   4 +-
 copy/xfs_copy.c             | 196 +++++++++++++++++++++++++++++++++++---------
 copy/xfs_copy.h             |   1 +
 db/init.c                   |  25 +++---
 db/metadump.c               |  21 ++++-
 db/sb.c                     |  18 +++-
 include/libxfs.h            |  13 ++-
 include/libxlog.h           |   3 +-
 include/xfs_mount.h         |   6 ++
 libxfs/libxfs_priv.h        |   2 +
 libxfs/rdwr.c               | 160 ++++++++++++++++++++++++++++++------
 libxfs/util.c               |  41 +++++++++
 libxfs/xfs_alloc.c          |  12 ++-
 libxfs/xfs_attr_leaf.c      |   2 +
 libxfs/xfs_btree.c          |  16 +++-
 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 +
 libxlog/util.c              |  37 +++++----
 mkfs/xfs_mkfs.c             |   4 +-
 repair/phase2.c             |  90 +++++++++++++-------
 repair/xfs_repair.c         |  79 +++++++++++++++++-
 28 files changed, 614 insertions(+), 150 deletions(-)
Signature · 6 lines
2.1.0

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs