diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2018-05-14 16:34:36 +0300 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2018-05-16 04:12:50 +0300 |
commit | 84d42ea6b6269aee7eb3d91a4425a08b8965fd4a (patch) | |
tree | 77f93fedc0ae20036d12a59dad18cb92849d014d /fs/xfs/scrub/scrub.h | |
parent | 718fa74b153f26623e5cacfb24522f72b7ae9d80 (diff) | |
download | linux-84d42ea6b6269aee7eb3d91a4425a08b8965fd4a.tar.xz |
xfs: implement the metadata repair ioctl flag
Plumb in the pieces necessary to make the "scrub" subfunction of
the scrub ioctl actually work. This means that we make the IFLAG_REPAIR
flag to the scrub ioctl actually do something, and we add an errortag
knob so that xfstests can force the kernel to rebuild a metadata
structure even if there's nothing wrong with it.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs/scrub/scrub.h')
-rw-r--r-- | fs/xfs/scrub/scrub.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/xfs/scrub/scrub.h b/fs/xfs/scrub/scrub.h index 5d797319fc9a..2f89a84a0e10 100644 --- a/fs/xfs/scrub/scrub.h +++ b/fs/xfs/scrub/scrub.h @@ -38,6 +38,9 @@ struct xfs_scrub_meta_ops { /* Examine metadata for errors. */ int (*scrub)(struct xfs_scrub_context *); + /* Repair or optimize the metadata. */ + int (*repair)(struct xfs_scrub_context *); + /* Decide if we even have this piece of metadata. */ bool (*has)(struct xfs_sb *); |