On Thu, Jun 22, 2023 at 01:17:32PM +1000, Dave Chinner wrote: > On Thu, May 25, 2023 at 05:50:47PM -0700, Darrick J. Wong wrote: > > From: Darrick J. Wong <djwong@xxxxxxxxxx> > > > > 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@xxxxxxxxxx> > > --- > > fs/xfs/libxfs/xfs_fs.h | 6 +++++- > > fs/xfs/scrub/scrub.c | 11 ++++++++++- > > fs/xfs/scrub/trace.h | 3 ++- > > 3 files changed, 17 insertions(+), 3 deletions(-) > > > > > > diff --git a/fs/xfs/libxfs/xfs_fs.h b/fs/xfs/libxfs/xfs_fs.h > > index 1cfd5bc6520a..920fd4513fcb 100644 > > --- a/fs/xfs/libxfs/xfs_fs.h > > +++ b/fs/xfs/libxfs/xfs_fs.h > > @@ -741,7 +741,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 (1 << 31) > > (1U << 31), otherwise a compiler somewhere will complain. > > Also, why use the high bit here? Mostly to make it much more obvious that some new flag bit is in use here. I'll change it to 1U<<8 before I merge it upstream. You'll see it in v26 which will also have all the api adjustments for 6.5. --D > -Dave. > -- > Dave Chinner > david@xxxxxxxxxxxxx