From: Darrick J. Wong Date: Wed, 21 Apr 2021 00:22:25 +0000 (-0700) Subject: generic/223: make sure all files get created on the data device X-Git-Tag: v2022.05.01~451 X-Git-Url: http://git.apps.os.sepia.ceph.com/?p=xfstests-dev.git;a=commitdiff_plain;h=982941cf89f5bc51581459fd3467a6cbdc54999d;ds=inline generic/223: make sure all files get created on the data device 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 Reviewed-by: Brian Foster Reviewed-by: Allison Henderson Signed-off-by: Eryu Guan --- 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