]> www.infradead.org Git - users/hch/xfsprogs.git/commit
xfs: add online scrub for superblock counters
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 19 Jul 2019 20:05:30 +0000 (16:05 -0400)
committerEric Sandeen <sandeen@redhat.com>
Fri, 19 Jul 2019 20:05:30 +0000 (16:05 -0400)
commit2b2b6280768f5216e2849f208c593eddc2cdbe19
tree1e81933eacb91d8b5ae140a10db594a756f8b55b
parent7602af0a5b87952b3a07895e1fd417018a0bdb09
xfs: add online scrub for superblock counters

Source kernel commit: 75efa57d0bf5fcf650a183f0ce0dc011ba8c4bc8

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>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_fs.h
libxfs/xfs_types.c
libxfs/xfs_types.h