public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: xfs@oss.sgi.com
Subject: [PATCH 0/9] xfsprogs: handle the log correctly on v5 supers
Date: Fri, 28 Aug 2015 14:06:38 -0400	[thread overview]
Message-ID: <1440785207-17543-1-git-send-email-bfoster@redhat.com> (raw)

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

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

             reply	other threads:[~2015-08-28 18:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-28 18:06 Brian Foster [this message]
2015-08-28 18:06 ` [PATCH 1/9] xfs: validate metadata LSNs against log on v5 superblocks Brian Foster
2015-08-28 18:06 ` [PATCH 2/9] libxfs: track largest metadata LSN in use via verifiers Brian Foster
2015-08-28 18:06 ` [PATCH 3/9] libxfs: don't hardcode cycle 1 into unmount op header Brian Foster
2015-08-28 18:06 ` [PATCH 4/9] libxfs: pass lsn param to log clear and record header logging helpers Brian Foster
2015-08-28 18:06 ` [PATCH 5/9] libxfs: add ability to clear log to arbitrary log cycle Brian Foster
2015-08-28 18:06 ` [PATCH 6/9] xfs_repair: track log state throughout all recovery phases Brian Foster
2015-08-28 18:06 ` [PATCH 7/9] xfs_repair: process the log in no_modify mode Brian Foster
2015-08-28 18:06 ` [PATCH 8/9] xfs_repair: format the log with forward cycle number on v5 supers Brian Foster
2015-08-28 18:06 ` [PATCH 9/9] xfs_repair: don't clear the log by default Brian Foster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1440785207-17543-1-git-send-email-bfoster@redhat.com \
    --to=bfoster@redhat.com \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox