public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC v2 0/2] xfs: detect and warn about invalid metadata lsns
@ 2015-09-11 18:53 Brian Foster
  2015-09-11 18:53 ` [RFC v2 1/2] xfs: create a daily warning mechanism Brian Foster
  2015-09-11 18:53 ` [RFC v2 2/2] xfs: validate metadata LSNs against log on v5 superblocks Brian Foster
  0 siblings, 2 replies; 5+ messages in thread
From: Brian Foster @ 2015-09-11 18:53 UTC (permalink / raw)
  To: xfs

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

-- 
2.1.0

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-09-22 14:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-11 18:53 [RFC v2 0/2] xfs: detect and warn about invalid metadata lsns Brian Foster
2015-09-11 18:53 ` [RFC v2 1/2] xfs: create a daily warning mechanism Brian Foster
2015-09-11 18:53 ` [RFC v2 2/2] xfs: validate metadata LSNs against log on v5 superblocks Brian Foster
2015-09-22  8:07   ` Dave Chinner
2015-09-22 14:21     ` Brian Foster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox