xfs: allow userspace to rebuild metadata structures
authorDarrick J. Wong <djwong@kernel.org>
Thu, 10 Aug 2023 14:48:11 +0000 (07:48 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 10 Aug 2023 14:48:11 +0000 (07:48 -0700)
commit5c83df2e54b6af870e3e02ccd2a8ecd54e36668c
treec4b49211e25b038da0ab4b0ca0132857ef972462
parent8336a64eb75cba4cc4749d9c4770fef53afdc1ad
xfs: allow userspace to rebuild metadata structures

Add a new (superuser-only) flag to the online metadata repair ioctl to
force it to rebuild structures, even if they're not broken.  We will use
this to move metadata structures out of the way during a free space
defragmentation operation.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
fs/xfs/libxfs/xfs_fs.h
fs/xfs/scrub/scrub.c
fs/xfs/scrub/trace.h