From 5ada217abe8fe47761c91a128f1ed721b0c2a43b Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Wed, 1 Sep 2021 11:25:40 -0700 Subject: 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 --- fs/xfs/scrub/trace.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'fs/xfs/scrub/trace.h') diff --git a/fs/xfs/scrub/trace.h b/fs/xfs/scrub/trace.h index 5c43578a174e..a2e6094e8c5a 100644 --- a/fs/xfs/scrub/trace.h +++ b/fs/xfs/scrub/trace.h @@ -111,7 +111,8 @@ TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_BARRIER); { XFS_SCRUB_OFLAG_WARNING, "warning" }, \ { XFS_SCRUB_OFLAG_NO_REPAIR_NEEDED, "norepair" }, \ { XFS_SCRUB_IFLAG_FREEZE_OK, "freeze" }, \ - { XFS_SCRUB_IFLAG_RETAIN_INODES, "icache" } + { XFS_SCRUB_IFLAG_RETAIN_INODES, "icache" }, \ + { XFS_SCRUB_IFLAG_FORCE_REBUILD, "rebuild" } DECLARE_EVENT_CLASS(xchk_class, TP_PROTO(struct xfs_inode *ip, struct xfs_scrub_metadata *sm, -- cgit v1.2.3