diff options
author | Darrick J. Wong <djwong@kernel.org> | 2023-11-14 10:39:26 +0100 |
---|---|---|
committer | Carlos Maiolino <cem@kernel.org> | 2023-11-14 13:32:49 +0100 |
commit | be49fa968f98cf797b16aa279b11c431199b3af3 (patch) | |
tree | 019ad5d9e5e16b4adb8122c3e29950cbb7c337df | |
parent | 6cfd0b487e7608eb63688ed6918c3f69526cb9f1 (diff) | |
download | xfsprogs-dev-be49fa968f98cf797b16aa279b11c431199b3af3.tar.gz |
xfs: allow userspace to rebuild metadata structures
Source kernel commit: 5c83df2e54b6af870e3e02ccd2a8ecd54e36668c
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>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
-rw-r--r-- | libxfs/xfs_fs.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libxfs/xfs_fs.h b/libxfs/xfs_fs.h index 2cbf9ea39b..6360073865 100644 --- a/libxfs/xfs_fs.h +++ b/libxfs/xfs_fs.h @@ -743,7 +743,11 @@ struct xfs_scrub_metadata { */ #define XFS_SCRUB_OFLAG_NO_REPAIR_NEEDED (1u << 7) -#define XFS_SCRUB_FLAGS_IN (XFS_SCRUB_IFLAG_REPAIR) +/* i: Rebuild the data structure. */ +#define XFS_SCRUB_IFLAG_FORCE_REBUILD (1u << 8) + +#define XFS_SCRUB_FLAGS_IN (XFS_SCRUB_IFLAG_REPAIR | \ + XFS_SCRUB_IFLAG_FORCE_REBUILD) #define XFS_SCRUB_FLAGS_OUT (XFS_SCRUB_OFLAG_CORRUPT | \ XFS_SCRUB_OFLAG_PREEN | \ XFS_SCRUB_OFLAG_XFAIL | \ |