xfs: force file creation to the data device for certain layout tests
authorDarrick J. Wong <djwong@kernel.org>
Wed, 19 May 2021 23:56:52 +0000 (16:56 -0700)
committerEryu Guan <guaneryu@gmail.com>
Sun, 23 May 2021 13:31:18 +0000 (21:31 +0800)
I found a bunch more tests in the xfs/ directory that try to create
specific metadata layouts on the data device, either because they're
fuzz tests or because they're testing specific edge cases of the code
base.  Either way, these test need to override '-d rtinherit' in the
MKFS_OPTIONS, so do that with _xfs_force_bdev.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/xfs/088
tests/xfs/089
tests/xfs/091
tests/xfs/120
tests/xfs/130
tests/xfs/139
tests/xfs/207
tests/xfs/229
tests/xfs/235

index 6c5cbec83127859e066dad60f22d3f71ece4a503..b3e65dcf12a190ddd7bdec3f8014ec7cdda4c31e 100755 (executable)
@@ -48,6 +48,7 @@ _scratch_mkfs_xfs > /dev/null
 echo "+ mount fs image"
 _scratch_mount
 blksz="$(stat -f -c '%s' "${SCRATCH_MNT}")"
+_xfs_force_bdev data $SCRATCH_MNT
 
 echo "+ make some files"
 mkdir -p "${TESTDIR}"
index 2892ad9eea06e84e8ca5a5f460548cb42cf1d3e6..21380798fcf3e20a74971c27e43129adf5946878 100755 (executable)
@@ -48,6 +48,7 @@ _scratch_mkfs_xfs > /dev/null
 echo "+ mount fs image"
 _scratch_mount
 blksz="$(stat -f -c '%s' "${SCRATCH_MNT}")"
+_xfs_force_bdev data $SCRATCH_MNT
 
 echo "+ make some files"
 mkdir -p "${TESTDIR}"
index 04322cecc36fdef1cb966936d624244950b94dd2..ff8f0f1f7dd0ad696d26677bac36b84c24b8fe16 100755 (executable)
@@ -48,6 +48,7 @@ _scratch_mkfs_xfs > /dev/null
 echo "+ mount fs image"
 _scratch_mount
 blksz="$(stat -f -c '%s' "${SCRATCH_MNT}")"
+_xfs_force_bdev data $SCRATCH_MNT
 
 echo "+ make some files"
 mkdir -p "${TESTDIR}"
index e66bc763c6049c79060d091647ea1d9dcb297129..f5eb14cce09afab6d43a599036858a79aa73460e 100755 (executable)
@@ -47,6 +47,7 @@ echo "+ mount fs image"
 _scratch_mount
 blksz="$(stat -f -c '%s' "${SCRATCH_MNT}")"
 nr="$((blksz * 2 / 16))"
+_xfs_force_bdev data $SCRATCH_MNT
 
 echo "+ make some files"
 $XFS_IO_PROG -f -c "pwrite -S 0x62 0 $((blksz * nr))" -c 'fsync' "${SCRATCH_MNT}/bigfile" >> $seqres.full
index 3071eace83a73a12c54fe1596c75e1863f192c2b..6f6e8512dd18c939fd149080f26bbfebefc8f304 100755 (executable)
@@ -43,6 +43,7 @@ echo "+ mount fs image"
 _scratch_mount
 blksz="$(stat -f -c '%s' "${SCRATCH_MNT}")"
 agcount="$(_xfs_mount_agcount $SCRATCH_MNT)"
+_xfs_force_bdev data $SCRATCH_MNT
 
 echo "+ make some files"
 _pwrite_byte 0x62 0 $((blksz * 64)) "${SCRATCH_MNT}/file0" >> "$seqres.full"
index 1444444db98a77599a6d039e05a4b16ebddb7e67..58b717110af597deb80d4cd6880e7f73e543c542 100755 (executable)
@@ -38,12 +38,14 @@ rm -f $seqres.full
 
 _scratch_mkfs >/dev/null 2>&1
 _scratch_mount
+_xfs_force_bdev data $SCRATCH_MNT
 blksz=$(_get_file_block_size $SCRATCH_MNT)
 _scratch_unmount
 
 echo "Format and mount"
 _scratch_mkfs -d agsize=$((16384 * $blksz)) > $seqres.full 2>&1
 _scratch_mount >> $seqres.full 2>&1
+_xfs_force_bdev data $SCRATCH_MNT
 
 testdir=$SCRATCH_MNT/test-$seq
 mkdir $testdir
index f703c0dcf92faaefe74e1e210d8d992d453574ea..f0f3075448aab6343871240138463e65f876ab61 100755 (executable)
@@ -50,6 +50,7 @@ rm -f $seqres.full
 echo "Format and mount"
 _scratch_mkfs > $seqres.full 2>&1
 _scratch_mount >> $seqres.full 2>&1
+_xfs_force_bdev data $SCRATCH_MNT
 
 testdir=$SCRATCH_MNT/test-$seq
 mkdir $testdir
index e723b10b9e2ab844527f9db49fb5b9c61aa3e503..64851557d0a8bf7bb35b16c2cfb78de3bf834092 100755 (executable)
@@ -38,6 +38,7 @@ _require_fs_space $TEST_DIR 3200000
 TDIR="${TEST_DIR}/t_holes"
 NFILES="10"
 EXTSIZE="256k"
+_xfs_force_bdev data $TEST_DIR
 
 # Create the test directory
 mkdir ${TDIR}
index a2ab9e55e98c90e2c23ff7de1ee0a7beb1494a2d..55f5c5a67b78dc8e895049d35a47de11bb6d9c19 100755 (executable)
@@ -41,6 +41,7 @@ echo "+ mount fs image"
 _scratch_mount
 blksz=$(stat -f -c '%s' ${SCRATCH_MNT})
 agcount=$(_xfs_mount_agcount $SCRATCH_MNT)
+_xfs_force_bdev data $SCRATCH_MNT
 
 echo "+ make some files"
 _pwrite_byte 0x62 0 $((blksz * 64)) ${SCRATCH_MNT}/file0 >> $seqres.full