diff options
author | Darrick J. Wong <djwong@kernel.org> | 2022-04-11 15:54:22 -0700 |
---|---|---|
committer | Eryu Guan <guaneryu@gmail.com> | 2022-04-17 20:10:51 +0800 |
commit | d7ac035cfeecc4e3b264bae781aa4eedfd01bf03 (patch) | |
tree | 331a43f84dbcf99989d7d227a274302e315a6d7d | |
parent | c025dcf35b47e8d6139554e585e2f7124505c1dd (diff) | |
download | xfstests-dev-d7ac035cfeecc4e3b264bae781aa4eedfd01bf03.tar.gz |
xfs/187: don't rely on FSCOUNTS for free space data
Currently, this test relies on the XFS_IOC_FSCOUNTS ioctl to return
accurate free space information. It doesn't. Convert it to use statfs,
which uses the accurate versions of the percpu counters. Obviously,
this only becomes a problem when we convert the free rtx count to use
(sloppier) percpu counters instead of the (more precise and previously
buggy) ondisk superblock counts.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
-rwxr-xr-x | tests/xfs/187 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/xfs/187 b/tests/xfs/187 index 1929e566ac..a9dfb30a33 100755 --- a/tests/xfs/187 +++ b/tests/xfs/187 @@ -135,7 +135,7 @@ punch_off=$((bigfile_sz - frag_sz)) $here/src/punch-alternating $SCRATCH_MNT/bigfile -o $((punch_off / fsbsize)) -i $((rtextsize_blks * 2)) -s $rtextsize_blks # Make sure we have some free rtextents. -free_rtx=$($XFS_IO_PROG -c 'statfs' $SCRATCH_MNT | grep counts.freertx | awk '{print $3}') +free_rtx=$($XFS_IO_PROG -c 'statfs' $SCRATCH_MNT | grep statfs.f_bavail | awk '{print $3}') if [ $free_rtx -eq 0 ]; then echo "Expected fragmented free rt space, found none." fi |