linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/9] xfs: report corruption to the health trackers
@ 2019-11-14 18:19 Darrick J. Wong
  2019-11-14 18:19 ` [PATCH 1/9] xfs: separate the marking of sick and checked metadata Darrick J. Wong
                   ` (8 more replies)
  0 siblings, 9 replies; 27+ messages in thread
From: Darrick J. Wong @ 2019-11-14 18:19 UTC (permalink / raw)
  To: darrick.wong; +Cc: linux-xfs

Hi all,

For this series, we add the ability to record hints of corruption errors
in the health tracking system so that administrators can gather reports
about the status of live filesystems.  In the future, we'll be able to
connect the online fsck subsystem to use this information to enable more
targeted scanning of metadata.

If you're going to start using this mess, you probably ought to just
pull from my git trees, which are linked below.

This has been lightly tested with fstests.  Enjoy!
Comments and questions are, as always, welcome.

--D

kernel git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=corruption-health-reports

xfsprogs git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=corruption-health-reports

^ permalink raw reply	[flat|nested] 27+ messages in thread
* [PATCHSET v29.0 09/40] xfsprogs: report corruption to the health trackers
@ 2023-12-31 19:42 Darrick J. Wong
  2023-12-31 22:11 ` [PATCH 1/9] xfs: separate the marking of sick and checked metadata Darrick J. Wong
  0 siblings, 1 reply; 27+ messages in thread
From: Darrick J. Wong @ 2023-12-31 19:42 UTC (permalink / raw)
  To: djwong, cem; +Cc: linux-xfs

Hi all,

Any time that the runtime code thinks it has found corrupt metadata, it
should tell the health tracking subsystem that the corresponding part of
the filesystem is sick.  These reports come primarily from two places --
code that is reading a buffer that fails validation, and higher level
pieces that observe a conflict involving multiple buffers.  This
patchset uses automated scanning to update all such callsites with a
mark_sick call.

Doing this enables the health system to record problem observed at
runtime, which (for now) can prompt the sysadmin to run xfs_scrub, and
(later) may enable more targetted fixing of the filesystem.

Note: Earlier reviewers of this patchset suggested that the verifier
functions themselves should be responsible for calling _mark_sick.  In a
higher level language this would be easily accomplished with lambda
functions and closures.  For the kernel, however, we'd have to create
the necessary closures by hand, pass them to the buf_read calls, and
then implement necessary state tracking to detach the xfs_buf from the
closure at the necessary time.  This is far too much work and complexity
and will not be pursued further.

If you're going to start using this code, I strongly recommend pulling
from my git trees, which are linked below.

This has been running on the djcloud for months with no problems.  Enjoy!
Comments and questions are, as always, welcome.

--D

kernel git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=corruption-health-reports

xfsprogs git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=corruption-health-reports

fstests git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=corruption-health-reports
---
 libxfs/util.c            |   10 +++
 libxfs/xfs_ag.c          |    5 +-
 libxfs/xfs_alloc.c       |  105 ++++++++++++++++++++++++++++++------
 libxfs/xfs_attr_leaf.c   |    4 +
 libxfs/xfs_attr_remote.c |   35 +++++++-----
 libxfs/xfs_bmap.c        |  135 +++++++++++++++++++++++++++++++++++++++++-----
 libxfs/xfs_btree.c       |   39 ++++++++++++-
 libxfs/xfs_da_btree.c    |   37 +++++++++++--
 libxfs/xfs_dir2.c        |    5 +-
 libxfs/xfs_dir2_block.c  |    2 +
 libxfs/xfs_dir2_data.c   |    3 +
 libxfs/xfs_dir2_leaf.c   |    3 +
 libxfs/xfs_dir2_node.c   |    7 ++
 libxfs/xfs_health.h      |   35 +++++++++++-
 libxfs/xfs_ialloc.c      |   57 ++++++++++++++++---
 libxfs/xfs_inode_buf.c   |   12 +++-
 libxfs/xfs_inode_fork.c  |    8 +++
 libxfs/xfs_refcount.c    |   43 ++++++++++++++-
 libxfs/xfs_rmap.c        |   83 +++++++++++++++++++++++++++-
 libxfs/xfs_rtbitmap.c    |    9 +++
 libxfs/xfs_sb.c          |    2 +
 21 files changed, 559 insertions(+), 80 deletions(-)


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

end of thread, other threads:[~2023-12-31 22:11 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-14 18:19 [PATCH v4 0/9] xfs: report corruption to the health trackers Darrick J. Wong
2019-11-14 18:19 ` [PATCH 1/9] xfs: separate the marking of sick and checked metadata Darrick J. Wong
2019-11-20 14:20   ` Brian Foster
2019-11-20 16:12     ` Darrick J. Wong
2019-11-14 18:19 ` [PATCH 2/9] xfs: report ag header corruption errors to the health tracking system Darrick J. Wong
2019-11-20 14:20   ` Brian Foster
2019-11-20 16:43     ` Darrick J. Wong
2019-11-21 13:26       ` Brian Foster
2019-11-22  0:53         ` Darrick J. Wong
2019-11-22 11:57           ` Brian Foster
2019-11-22 18:10             ` Darrick J. Wong
2019-11-14 18:19 ` [PATCH 3/9] xfs: report block map " Darrick J. Wong
2019-11-20 14:21   ` Brian Foster
2019-11-20 16:57     ` Darrick J. Wong
2019-11-14 18:19 ` [PATCH 4/9] xfs: report btree block corruption errors to the health system Darrick J. Wong
2019-11-14 18:19 ` [PATCH 5/9] xfs: report dir/attr " Darrick J. Wong
2019-11-20 16:11   ` Brian Foster
2019-11-20 16:55     ` Darrick J. Wong
2019-11-21 13:26       ` Brian Foster
2019-11-22  1:03         ` Darrick J. Wong
2019-11-22 12:28           ` Brian Foster
2019-11-22 18:35             ` Darrick J. Wong
2019-11-14 18:19 ` [PATCH 6/9] xfs: report symlink " Darrick J. Wong
2019-11-14 18:19 ` [PATCH 7/9] xfs: report inode " Darrick J. Wong
2019-11-14 18:20 ` [PATCH 8/9] xfs: report quota block " Darrick J. Wong
2019-11-14 18:20 ` [PATCH 9/9] xfs: report realtime metadata " Darrick J. Wong
2023-12-31 19:42 [PATCHSET v29.0 09/40] xfsprogs: report corruption to the health trackers Darrick J. Wong
2023-12-31 22:11 ` [PATCH 1/9] xfs: separate the marking of sick and checked metadata Darrick J. Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).