Skip to content

RFC xfs: detect and warn about invalid metadata lsns

Brian Foster linux-xfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 RFC Latest2 patches 2 repliesIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2xfs: create a daily warning mechanismfs/xfs/xfs_message.h+14 -40 replies
2/2xfs: validate metadata LSNs against log on v5 superblocksfs/xfs/libxfs/xfs_alloc.c fs/xfs/libxfs/xfs_attr_leaf.c fs/xfs/libxfs/xfs_btree.c +13 more+135 -82 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [RFC v2 0/2] xfs: detect and warn about invalid metadata lsns

Hi all,

Here's a second rfc pass at the kernel side of invalid metadata LSN detection for v5 supers. This is an rfc simply because my understanding is that the userspace code should probably go first so that the tools for repair are available before the kernel starts detecting and warning about this problem.

The primary change in this version is how the problem is handled once detected. I've been a bit undecided on whether a shutdown is really warranted because if the fs doesn't crash, it will eventually self-correct. On the flipside, a WARN_ON_ONCE() is not sufficient because it could suppress warnings on separate filesystems once one filesystem has encountered the issue and fired a warning.

Therefore, this version uses something of a happy medium. The filesystem is not shutdown but a mount flag is used to warn about the problem at least once per-mount. Any instances thereafter are ratelimited to a once per 24 hour period.

Brian

rfcv2:
- Refactored lsn validation and warning code into separate helpers.
- Updated warning mechanism to warn at least once per fs (ratelimited thereafter).
- No longer shutdown the fs on invalid metadata lsn detection.
rfcv1: http://oss.sgi.com/pipermail/xfs/2015-August/043396.html

Brian Foster (2):
xfs: create a daily warning mechanism
xfs: validate metadata LSNs against log on v5 superblocks

 fs/xfs/libxfs/xfs_alloc.c          |  9 +++++--
 fs/xfs/libxfs/xfs_attr_leaf.c      |  2 ++
 fs/xfs/libxfs/xfs_btree.c          | 14 +++++++++--
 fs/xfs/libxfs/xfs_da_btree.c       |  3 +++
 fs/xfs/libxfs/xfs_dir2_block.c     |  1 +
 fs/xfs/libxfs/xfs_dir2_data.c      |  1 +
 fs/xfs/libxfs/xfs_dir2_leaf.c      |  1 +
 fs/xfs/libxfs/xfs_dir2_node.c      |  1 +
 fs/xfs/libxfs/xfs_ialloc.c         |  8 +++++--
 fs/xfs/libxfs/xfs_sb.c             |  8 +++++++
 fs/xfs/libxfs/xfs_symlink_remote.c |  3 +++
 fs/xfs/xfs_log.c                   |  1 -
 fs/xfs/xfs_log_priv.h              | 24 +++++++++++++++++++
 fs/xfs/xfs_log_recover.c           | 15 +++++++++++-
 fs/xfs/xfs_message.h               | 18 ++++++++++----
 fs/xfs/xfs_mount.c                 | 49 ++++++++++++++++++++++++++++++++++++++
 fs/xfs/xfs_mount.h                 |  3 +++
 17 files changed, 149 insertions(+), 12 deletions(-)
Signature · 6 lines
2.1.0

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