]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: add online scrub for superblock counters
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 24 Jul 2019 19:54:07 +0000 (15:54 -0400)
committerEric Sandeen <sandeen@redhat.com>
Wed, 24 Jul 2019 19:54:07 +0000 (15:54 -0400)
commite9caede6e2f5691b18798d88e236314af8c72f20
tree1e81933eacb91d8b5ae140a10db594a756f8b55b
parent9833c1a425e00d1cf113ed66bea03c5d801ac2f7
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