diff mbox series

[1/2] generic/223: make sure all files get created on the data device

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

Commit Message

Darrick J. Wong April 21, 2021, 12:22 a.m. UTC
From: Darrick J. Wong <djwong@kernel.org>

This test formats filesystems with various stripe alignments, then
checks that data file allocations are actually aligned to those stripe
geometries.  If this test is run on an XFS filesystem with a realtime
volume and RTINHERIT is set on the root dir, the test will fail because
all new files will be created as realtime files, and realtime
allocations are not subject to data device stripe alignments.  Fix this
by clearing rtinherit on the root dir.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
 tests/generic/223 |    5 +++++
 1 file changed, 5 insertions(+)

Comments

Brian Foster April 21, 2021, 5:26 p.m. UTC | #1
On Tue, Apr 20, 2021 at 05:22:25PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> This test formats filesystems with various stripe alignments, then
> checks that data file allocations are actually aligned to those stripe
> geometries.  If this test is run on an XFS filesystem with a realtime
> volume and RTINHERIT is set on the root dir, the test will fail because
> all new files will be created as realtime files, and realtime
> allocations are not subject to data device stripe alignments.  Fix this
> by clearing rtinherit on the root dir.
> 
> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> ---

Reviewed-by: Brian Foster <bfoster@redhat.com>

>  tests/generic/223 |    5 +++++
>  1 file changed, 5 insertions(+)
> 
> 
> diff --git a/tests/generic/223 b/tests/generic/223
> index 1f85efe5..f6393293 100755
> --- a/tests/generic/223
> +++ b/tests/generic/223
> @@ -43,6 +43,11 @@ for SUNIT_K in 8 16 32 64 128; do
>  	_scratch_mkfs_geom $SUNIT_BYTES 4 $BLOCKSIZE >> $seqres.full 2>&1
>  	_scratch_mount
>  
> +	# This test checks for stripe alignments of space allocations on the
> +	# filesystem.  Make sure all files get created on the main device,
> +	# which for XFS means no rt files.
> +	test "$FSTYP" = "xfs" && $XFS_IO_PROG -c 'chattr -t' $SCRATCH_MNT
> +
>  	for SIZE_MULT in 1 2 8 64 256; do
>  		let SIZE=$SIZE_MULT*$SUNIT_BYTES
>  
>
Allison Henderson April 22, 2021, 12:29 a.m. UTC | #2
On 4/20/21 5:22 PM, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> This test formats filesystems with various stripe alignments, then
> checks that data file allocations are actually aligned to those stripe
> geometries.  If this test is run on an XFS filesystem with a realtime
> volume and RTINHERIT is set on the root dir, the test will fail because
> all new files will be created as realtime files, and realtime
> allocations are not subject to data device stripe alignments.  Fix this
> by clearing rtinherit on the root dir.
> 
> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
ok, makes sense

Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
> ---
>   tests/generic/223 |    5 +++++
>   1 file changed, 5 insertions(+)
> 
> 
> diff --git a/tests/generic/223 b/tests/generic/223
> index 1f85efe5..f6393293 100755
> --- a/tests/generic/223
> +++ b/tests/generic/223
> @@ -43,6 +43,11 @@ for SUNIT_K in 8 16 32 64 128; do
>   	_scratch_mkfs_geom $SUNIT_BYTES 4 $BLOCKSIZE >> $seqres.full 2>&1
>   	_scratch_mount
>   
> +	# This test checks for stripe alignments of space allocations on the
> +	# filesystem.  Make sure all files get created on the main device,
> +	# which for XFS means no rt files.
> +	test "$FSTYP" = "xfs" && $XFS_IO_PROG -c 'chattr -t' $SCRATCH_MNT
> +
>   	for SIZE_MULT in 1 2 8 64 256; do
>   		let SIZE=$SIZE_MULT*$SUNIT_BYTES
>   
>
diff mbox series

Patch

diff --git a/tests/generic/223 b/tests/generic/223
index 1f85efe5..f6393293 100755
--- a/tests/generic/223
+++ b/tests/generic/223
@@ -43,6 +43,11 @@  for SUNIT_K in 8 16 32 64 128; do
 	_scratch_mkfs_geom $SUNIT_BYTES 4 $BLOCKSIZE >> $seqres.full 2>&1
 	_scratch_mount
 
+	# This test checks for stripe alignments of space allocations on the
+	# filesystem.  Make sure all files get created on the main device,
+	# which for XFS means no rt files.
+	test "$FSTYP" = "xfs" && $XFS_IO_PROG -c 'chattr -t' $SCRATCH_MNT
+
 	for SIZE_MULT in 1 2 8 64 256; do
 		let SIZE=$SIZE_MULT*$SUNIT_BYTES