diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2019-04-25 18:26:24 -0700 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2019-04-30 08:19:13 -0700 |
commit | 75efa57d0bf5fcf650a183f0ce0dc011ba8c4bc8 (patch) | |
tree | d6dfd62d2680be7cdb73e61e857e833f12ae0a78 /fs/xfs/libxfs/xfs_fs.h | |
parent | 94079285756d66b1aded4e36d35452cb1f9c953a (diff) | |
download | linux-75efa57d0bf5fcf650a183f0ce0dc011ba8c4bc8.tar.gz linux-75efa57d0bf5fcf650a183f0ce0dc011ba8c4bc8.tar.bz2 linux-75efa57d0bf5fcf650a183f0ce0dc011ba8c4bc8.zip |
xfs: add online scrub for superblock counters
Teach online scrub how to check the filesystem summary counters. We use
the incore delalloc block counter along with the incore AG headers to
compute expected values for fdblocks, icount, and ifree, and then check
that the percpu counter is within a certain threshold of the expected
value. This is done to avoid having to freeze or otherwise lock the
filesystem, which means that we're only checking that the counters are
fairly close, not that they're exactly correct.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_fs.h')
-rw-r--r-- | fs/xfs/libxfs/xfs_fs.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_fs.h b/fs/xfs/libxfs/xfs_fs.h index 43a53b03247b..e7382c780ed7 100644 --- a/fs/xfs/libxfs/xfs_fs.h +++ b/fs/xfs/libxfs/xfs_fs.h @@ -578,9 +578,10 @@ struct xfs_scrub_metadata { #define XFS_SCRUB_TYPE_UQUOTA 21 /* user quotas */ #define XFS_SCRUB_TYPE_GQUOTA 22 /* group quotas */ #define XFS_SCRUB_TYPE_PQUOTA 23 /* project quotas */ +#define XFS_SCRUB_TYPE_FSCOUNTERS 24 /* fs summary counters */ /* Number of scrub subcommands. */ -#define XFS_SCRUB_TYPE_NR 24 +#define XFS_SCRUB_TYPE_NR 25 /* i: Repair this metadata. */ #define XFS_SCRUB_IFLAG_REPAIR (1 << 0) |