mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
xfs: force file creation to the data device for certain layout tests
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>
This commit is contained in:
committed by
Eryu Guan
parent
8d54e50288
commit
ea15099b71
@@ -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}"
|
||||
|
||||
@@ -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}"
|
||||
|
||||
@@ -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}"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user