All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/39] xfsprogs: online scrub/repair support
@ 2016-11-05  0:24 Darrick J. Wong
  2016-11-05  0:24 ` [PATCH 01/39] xfs: plumb in needed functions for range querying of the freespace btrees Darrick J. Wong
                   ` (38 more replies)
  0 siblings, 39 replies; 42+ messages in thread
From: Darrick J. Wong @ 2016-11-05  0:24 UTC (permalink / raw)
  To: david, darrick.wong; +Cc: linux-xfs

Hi all,

This is the second revision of a patchset that adds to XFS userland
tools support for online metadata scrubbing and repair.  There aren't
any on-disk format changes.

Online scrub/repair support consists of four major pieces -- first, an
ioctl that maps physical extents to their owners; second, various
in-kernel metadata scrubbing ioctls to examine metadata records and
cross-reference them with other filesystem metadata; third, an in-kernel
mechanism for rebuilding damaged metadata objects and btrees; and
fourth, a userspace component to initiate kernel scrubbing, walk all
inodes and the directory tree, scrub data extents, and ask the kernel to
repair anything that is broken.

This new utility, xfs_scrub, is separate from the existing offline
xfs_repair tool.  Scrub has three main modes of operation -- in its most
powerful mode, it iterates all XFS metadata and asks the kernel to check
the metadata and repair it if necessary.  The second most powerful mode
can use certain VFS methods and XFS ioctls (BULKSTAT, GETBMAP, and
GETFSMAP) to check as much metadata as it reasonably can from userspace.
It cannot repair anything.  The least powerful mode uses only VFS
functions to access as much of the directory/file/xattr graph as
possible.  It has no mechanism to check internal metadata and also
cannot repair anything.  This is good enough for scrubbing non-XFS
filesystems, but it is intended for the first mode to be used.

Most of the patches in this series are direct imports of the libxfs
changes that the kernel scrubber needed to operate.  The changes to
userspace programs are limited to wiring up ioctl support in xfs_io,
support for per-field fuzzing in xfs_db, and the last patch, which
creates the xfs_scrub program.

The final patch in the series provides the xfs_scrub utility.

If you're going to start using this mess, you probably ought to just
pull from my github trees for kernel[1], xfsprogs[2], and xfstests[3].
The kernel patches in the git trees should apply to 4.9-rc3; xfsprogs
patches to for-next; and xfstest to master.

The patches have survived all auto group xfstests both with scrub-only
mode and also a special debugging mode to xfs_scrub that forces it to
rebuild the metadata structures even if they're not damaged.  Note that
I haven't thoroughly run the new tests in [3] that try to fuzz every
field in every data structure on disk.

This is an extraordinary way to eat your data.  Enjoy! 
Comments and questions are, as always, welcome.

--D

[1] https://github.com/djwong/linux/tree/djwong-devel
[2] https://github.com/djwong/xfsprogs/tree/djwong-devel
[3] https://github.com/djwong/xfstests/tree/djwong-devel

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

end of thread, other threads:[~2016-11-08  8:37 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-05  0:24 [PATCH v2 00/39] xfsprogs: online scrub/repair support Darrick J. Wong
2016-11-05  0:24 ` [PATCH 01/39] xfs: plumb in needed functions for range querying of the freespace btrees Darrick J. Wong
2016-11-05  0:24 ` [PATCH 02/39] xfs: provide a query_range function for " Darrick J. Wong
2016-11-05  0:24 ` [PATCH 03/39] xfs: create a function to query all records in a btree Darrick J. Wong
2016-11-05  0:24 ` [PATCH 04/39] xfs: introduce the XFS_IOC_GETFSMAP ioctl Darrick J. Wong
2016-11-05  0:25 ` [PATCH 05/39] xfs_io: support the new getfsmap ioctl Darrick J. Wong
2016-11-05  0:25 ` [PATCH 06/39] xfs: use GPF_NOFS when allocating btree cursors Darrick J. Wong
2016-11-05  0:25 ` [PATCH 07/39] xfs: add scrub tracepoints Darrick J. Wong
2016-11-05  0:25 ` [PATCH 08/39] xfs: create an ioctl to scrub AG metadata Darrick J. Wong
2016-11-05  0:25 ` [PATCH 09/39] xfs: generic functions to scrub metadata and btrees Darrick J. Wong
2016-11-05  0:25 ` [PATCH 10/39] xfs: scrub the backup superblocks Darrick J. Wong
2016-11-05  0:25 ` [PATCH 11/39] xfs: scrub AGF and AGFL Darrick J. Wong
2016-11-05  0:25 ` [PATCH 12/39] xfs: scrub the AGI Darrick J. Wong
2016-11-05  0:25 ` [PATCH 13/39] xfs: support scrubbing free space btrees Darrick J. Wong
2016-11-05  0:26 ` [PATCH 14/39] xfs: support scrubbing inode btrees Darrick J. Wong
2016-11-05  0:26 ` [PATCH 15/39] xfs: support scrubbing rmap btree Darrick J. Wong
2016-11-05  0:26 ` [PATCH 16/39] xfs: support scrubbing refcount btree Darrick J. Wong
2016-11-05  0:26 ` [PATCH 17/39] xfs: scrub inodes Darrick J. Wong
2016-11-05  0:26 ` [PATCH 18/39] xfs: scrub inode block mappings Darrick J. Wong
2016-11-05  0:26 ` [PATCH 19/39] xfs: scrub directory/attribute btrees Darrick J. Wong
2016-11-05  0:26 ` [PATCH 20/39] xfs: scrub directories Darrick J. Wong
2016-11-05  0:26 ` [PATCH 21/39] xfs: scrub extended attributes Darrick J. Wong
2016-11-05  0:26 ` [PATCH 22/39] xfs: scrub symbolic links Darrick J. Wong
2016-11-05  0:27 ` [PATCH 23/39] xfs: scrub realtime bitmap/summary Darrick J. Wong
2016-11-05  0:27 ` [PATCH 24/39] xfs: scrub should cross-reference with the bnobt Darrick J. Wong
2016-11-05  0:27 ` [PATCH 25/39] xfs: cross-reference bnobt records with cntbt Darrick J. Wong
2016-11-05  0:27 ` [PATCH 26/39] xfs: cross-reference inode btrees during scrub Darrick J. Wong
2016-11-05  0:27 ` [PATCH 27/39] xfs: cross-reference reverse-mapping btree Darrick J. Wong
2016-11-05  0:27 ` [PATCH 28/39] xfs: cross-reference refcount btree during scrub Darrick J. Wong
2016-11-05  0:27 ` [PATCH 29/39] xfs: scrub should cross-reference the realtime bitmap Darrick J. Wong
2016-11-05  0:27 ` [PATCH 30/39] xfs: add helper routines for the repair code Darrick J. Wong
2016-11-05  0:27 ` [PATCH 31/39] xfs: repair inode btrees Darrick J. Wong
2016-11-05  0:27 ` [PATCH 32/39] xfs: rebuild the rmapbt Darrick J. Wong
2016-11-05  0:28 ` [PATCH 33/39] xfs: repair refcount btrees Darrick J. Wong
2016-11-05  0:28 ` [PATCH 34/39] xfs: repair inode block maps Darrick J. Wong
2016-11-05  0:28 ` [PATCH 35/39] xfs: query the per-AG reservation counters Darrick J. Wong
2016-11-05  0:28 ` [PATCH 36/39] xfs_db: introduce fuzz command Darrick J. Wong
2016-11-05  0:28 ` [PATCH 37/39] xfs_db: print attribute remote value blocks Darrick J. Wong
2016-11-05  0:28 ` [PATCH 38/39] xfs_io: provide an interface to the scrub ioctls Darrick J. Wong
2016-11-05  0:28 ` [PATCH 39/39] xfs_scrub: create online filesystem scrub program Darrick J. Wong
2016-11-05  5:22   ` Eryu Guan
2016-11-08  8:37     ` Darrick J. Wong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.