diff mbox series

[5/4] xfs/076: only create files on the data device

Message ID 20220316221232.GE8200@magnolia (mailing list archive)
State Accepted
Headers show
Series fstests: random fixes | expand

Commit Message

Darrick J. Wong March 16, 2022, 10:12 p.m. UTC
From: Darrick J. Wong <djwong@kernel.org>

This test checks that filesystems with sparse inode support can continue
to allocate inodes when free space gets fragmented.  Inodes only exist
on the data device, so we need to ensure that realtime is not enabled on
the filesystem so that the rt metadata doesn't mess with the inode usage
percentage and cause a test failure.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
 tests/xfs/076 |   13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

Comments

Zorro Lang March 22, 2022, 8:31 a.m. UTC | #1
On Wed, Mar 16, 2022 at 03:12:32PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> This test checks that filesystems with sparse inode support can continue
> to allocate inodes when free space gets fragmented.  Inodes only exist
> on the data device, so we need to ensure that realtime is not enabled on
> the filesystem so that the rt metadata doesn't mess with the inode usage
> percentage and cause a test failure.
> 
> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> ---

Looks good to me,

Reviewed-by: Zorro Lang <zlang@redhat.com>

>  tests/xfs/076 |   13 +++++++++++--
>  1 file changed, 11 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/xfs/076 b/tests/xfs/076
> index eac7410e..8eef1367 100755
> --- a/tests/xfs/076
> +++ b/tests/xfs/076
> @@ -55,12 +55,21 @@ _alloc_inodes()
>  
>  # real QA test starts here
>  
> -_require_scratch
> +if [ -n "$SCRATCH_RTDEV" ]; then
> +	# ./check won't know we unset SCRATCH_RTDEV
> +	_require_scratch_nocheck
> +else
> +	_require_scratch
> +fi
>  _require_xfs_io_command "falloc"
>  _require_xfs_io_command "fpunch"
>  _require_xfs_sparse_inodes
>  
> -_scratch_mkfs "-d size=50m -m crc=1 -i sparse" |
> +# Disable the scratch rt device to avoid test failures relating to the rt
> +# bitmap consuming all the free space in our small data device.
> +unset SCRATCH_RTDEV
> +
> +_scratch_mkfs "-d size=50m -m crc=1 -i sparse" | tee -a $seqres.full |
>  	_filter_mkfs > /dev/null 2> $tmp.mkfs
>  . $tmp.mkfs	# for isize
>  
>
diff mbox series

Patch

diff --git a/tests/xfs/076 b/tests/xfs/076
index eac7410e..8eef1367 100755
--- a/tests/xfs/076
+++ b/tests/xfs/076
@@ -55,12 +55,21 @@  _alloc_inodes()
 
 # real QA test starts here
 
-_require_scratch
+if [ -n "$SCRATCH_RTDEV" ]; then
+	# ./check won't know we unset SCRATCH_RTDEV
+	_require_scratch_nocheck
+else
+	_require_scratch
+fi
 _require_xfs_io_command "falloc"
 _require_xfs_io_command "fpunch"
 _require_xfs_sparse_inodes
 
-_scratch_mkfs "-d size=50m -m crc=1 -i sparse" |
+# Disable the scratch rt device to avoid test failures relating to the rt
+# bitmap consuming all the free space in our small data device.
+unset SCRATCH_RTDEV
+
+_scratch_mkfs "-d size=50m -m crc=1 -i sparse" | tee -a $seqres.full |
 	_filter_mkfs > /dev/null 2> $tmp.mkfs
 . $tmp.mkfs	# for isize