-
xfs_scrub: integrate services with systemd
djwong committedSep 27, 2017 Create a systemd service unit so that we can run the online scrubber under systemd with (somewhat) appropriate containment. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
-
xfs_scrub: create a script to scrub all xfs filesystems
djwong committedSep 27, 2017 Create an xfs_scrub_all command to find all XFS filesystems and run an online scrub against them all. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
-
djwong committed
Sep 27, 2017 Implement a progress indicator. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
-
xfs_scrub: warn about normalized Unicode name collisions
djwong committedSep 27, 2017 Iterate all directory and xattr names to look for name collisions amongst Unicode normalized names. This is generally a sign of buggy programs or malicious duplicate files. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
-
xfs_scrub: fstrim the free areas if there are no errors on the filesy…
djwong committedSep 27, 2017 …stem If the filesystem scan comes out clean or fixes all the problems, call fstrim to clean out the free areas (if it's an ssd/thinp/whatever). Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
-
xfs_scrub: schedule and manage repairs to the filesystem
djwong committedSep 27, 2017 Teach xfs_scrub to remember scrub requests that failed (or indicated that optimization is a possibility) as repair requests that can be deferred until later. Add a new repair phase that deals with the repair requests. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
-
xfs_scrub: wire up repair ioctl
djwong committedSep 27, 2017 Create the mechanism we need to actually call the kernel's online repair functionality. The interface will consume a repair description; the descriptor management will follow in the next patch. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
-
xfs_scrub: check summary counters
djwong committedSep 27, 2017 Make sure the filesystem summary counters are somewhat close to what we can find by scanning the filesystem. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
-
xfs_scrub: optionally use SCSI READ VERIFY commands to scrub data blo…
djwong committedSep 27, 2017 …cks on disk If we sense that we're talking to a raw SCSI disk, use the SCSI READ VERIFY command to ask the disk to verify a disk internally. This can sharply reduce the runtime of the data block verification phase on devices whose internal bandwidth exceeds their link bandwidth. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
-
xfs_scrub: scrub file data blocks
djwong committedSep 27, 2017 Read all data blocks from the disk, hoping to catch IO errors. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
-
xfs_scrub: create iterator wrappers for block and fs space map ioctls
djwong committedSep 27, 2017 Create a couple of functions to iterate a file's block map or the filesystem's space map. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
-
xfs_scrub: create infrastructure to read verify data blocks
djwong committedSep 27, 2017 Manage the scheduling, issuance, and reporting of data block verification reads. This enables us to combine adjacent (or nearly adjacent) read requests, and to take advantage of high-IOPS devices by issuing IO from multiple threads. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
-
xfs_scrub: create a bitmap data structure
djwong committedSep 27, 2017 Create an efficient tree-based bitmap data structure. We will use this during the data block scan to record the LBAs of IO errors so that we can report broken files to userspace. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
-
xfs_scrub: thread-safe stats counter
djwong committedSep 27, 2017 Create a threaded stats counter that we'll use to track scan progress. This includes things like how much of the disk blocks we've scanned, or later how much progress we've made in each phase. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
-
xfs_scrub: check directory connectivity
djwong committedSep 27, 2017 Opening directories by file handle will cause the kernel to perform parent lookups all the way to the root directory. Take advantage of this to ensure that directories actually connect to the root. Some day we'll have parent pointers and can make this more comprehensive. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
-
djwong committed
Sep 27, 2017 Scan all the inodes in the system for problems. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
-
xfs_scrub: scan filesystem and AG metadata
djwong committedSep 27, 2017 Scrub the filesystem and per-AG metadata. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
-
xfs_scrub: find XFS filesystem geometry
djwong committedSep 27, 2017 Discover the geometry of the XFS filesystem that we've been told to scan, and set up some common functions that will be used by the scrub phases. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
-
xfs_scrub: bind to a mount point and a block device
djwong committedSep 27, 2017 Create an abstraction to handle all of our low level disk operations, then use it to bind to a fs mount point and block device. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
-
xfs_scrub: dispatch the various phases of the scrub program
djwong committedSep 27, 2017 Create the dispatching routines that we'll use to call out to each separate phase of the program. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
-
xfs_scrub: set up command line argument parsing
djwong committedSep 27, 2017 Parse command line options in order to set up the context in which we will scrub the filesystem. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
-
xfs_scrub: common error handling
djwong committedSep 27, 2017 Standardize how we record and report errors. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
-
xfs_scrub: create online filesystem scrub program
djwong committedSep 27, 2017 Create the foundations of a filesystem scrubbing tool that asks the kernel to inspect all metadata in the filesystem and (ultimately) to repair anything that's broken. Also create the man page for the utility. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
-
man: describe the metadata scrubbing ioctl
djwong committedSep 27, 2017 Document the XFS-specific metadata scrub/repair ioctl's behavior, arguments, and side effects. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
-
xfs_io: provide an interface to the scrub ioctls
djwong committedSep 27, 2017 Create a new xfs_io command to call the new XFS metadata scrub ioctl. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
-
xfs_repair: rebuild bmbt from rmapbt data
djwong committedSep 27, 2017 Use rmap records to rebuild corrupt inode forks instead of zapping the whole inode. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
-
xfs_repair: push inode buf and dinode pointers all the way to inode f…
djwong committedSep 27, 2017 …ork processing Currently, the process_dinode* family of functions assume that they have the buffer backing the inodes locked, and therefore the dinode pointer won't ever change. However, the bmbt rebuilding code in the next patch will violate that assumption, so we must pass pointers to the inobp and the dinode pointer (that is to say, double pointers) all the way through to process_inode_{data,attr}_fork so that we can regrab the buffer after the rebuilding step finishes. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> -
xfs: add BMAPI_NORMAP flag to perform block remapping without updatin…
djwong committedSep 27, 2017 …g rmpabt Add a new flag, XFS_BMAPI_NORMAP, which will perform file block remapping without updating the rmapbt. This will be used by the repair code to reconstruct bmbts from the rmapbt, in which case we don't want the rmapbt update. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
-
xfs: add repair helpers for the reference count btree
djwong committedSep 27, 2017 Add a couple of functions to the refcount btree and generic btree code that will be used to repair the refcountbt. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
-
xfs: add repair helpers for the reverse mapping btree
djwong committedSep 27, 2017 Add a couple of functions to the reverse mapping btree that will be used to repair the rmapbt. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
-
xfs: expose various functions to repair code
djwong committedSep 27, 2017 Expose various helpers that the repair code will want to use. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
-
xfs: add helpers to calculate btree size
djwong committedSep 27, 2017 Add a bunch of helper functions that calculate the sizes of various btrees. These will be used to repair btrees and btree headers. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
-
xfs: scrub should cross-reference the realtime bitmap
djwong committedSep 27, 2017 While we're scrubbing various btrees, cross-reference the records with the other metadata. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
-
xfs: add scrub cross-referencing helpers for the refcount btrees
djwong committedSep 27, 2017 Add a couple of functions to the refcount btrees that will be used to cross-reference metadata against the refcountbt. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
-
xfs: add scrub cross-referencing helpers for the rmap btrees
djwong committedSep 27, 2017 Add a couple of functions to the rmap btrees that will be used to cross-reference metadata against the rmapbt. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>