mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
xfs_io -> XFS_IO_PROG as used by dgc
Merge of master-melb:xfs-cmds:22779a by kenmcd.
This commit is contained in:
@@ -85,16 +85,16 @@ write_block()
|
||||
|
||||
echo "Writing $bytes bytes, offset is $words (direct=$direct)" | _filter_io
|
||||
echo "Writing $bytes bytes at $location $words (direct=$direct)" >>$seq.full
|
||||
xfs_io -c "pwrite $offset 512" $flags $SCRATCH_MNT/$seq \
|
||||
2>&1 | _filter_off $offset | _filter_xfs_io | tee -a $seq.full
|
||||
$XFS_IO_PROG -c "pwrite $offset 512" $flags $SCRATCH_MNT/$seq \
|
||||
2>&1 | _filter_off $offset | _filter_$XFS_IO_PROG | tee -a $seq.full
|
||||
xfs_bmap -v $SCRATCH_MNT/$seq >>$seq.full
|
||||
|
||||
echo "Reading $bytes bytes (direct=$direct)" | _filter_io
|
||||
echo "Reading $bytes bytes at $location (direct=$direct)" >>$seq.full
|
||||
xfs_io -c "pread $offset $bytes" $flags $SCRATCH_MNT/$seq \
|
||||
2>&1 | _filter_off $offset | _filter_xfs_io | tee -a $seq.full
|
||||
$XFS_IO_PROG -c "pread $offset $bytes" $flags $SCRATCH_MNT/$seq \
|
||||
2>&1 | _filter_off $offset | _filter_$XFS_IO_PROG | tee -a $seq.full
|
||||
|
||||
xfs_io -c "pread -v $offset $bytes" $flags $SCRATCH_MNT/$seq >>$seq.full
|
||||
$XFS_IO_PROG -c "pread -v $offset $bytes" $flags $SCRATCH_MNT/$seq >>$seq.full
|
||||
|
||||
echo | tee -a $seq.full
|
||||
}
|
||||
@@ -103,7 +103,7 @@ write_block()
|
||||
_supported_fs xfs
|
||||
_supported_os IRIX Linux
|
||||
|
||||
[ -x /usr/sbin/xfs_io ] || _notrun "xfs_io executable not found"
|
||||
[ -x $XFS_IO_PROG ] || _notrun "$XFS_IO_PROG executable not found"
|
||||
|
||||
_require_scratch
|
||||
_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
|
||||
@@ -139,7 +139,7 @@ fi
|
||||
# boundary (and stash xfs_bmap output), before moving onto
|
||||
# each new test point.
|
||||
|
||||
xfs_io -c "truncate 0" -f $SCRATCH_MNT/$seq
|
||||
$XFS_IO_PROG -c "truncate 0" -f $SCRATCH_MNT/$seq
|
||||
|
||||
oneTB=`echo 1024 \* 1024 \* 1024 \* 1024 | bc`
|
||||
count=`expr $upperbound - 1`
|
||||
|
||||
@@ -61,7 +61,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
|
||||
_supported_fs xfs
|
||||
_supported_os IRIX Linux
|
||||
|
||||
[ -x /usr/sbin/xfs_io ] || _notrun "xfs_io executable not found"
|
||||
[ -n "$XFS_IO_PROG" ] || _notrun "xfs_io executable not found"
|
||||
|
||||
_require_scratch
|
||||
|
||||
@@ -78,19 +78,19 @@ avail=`df -P $SCRATCH_MNT | awk 'END {print $4}'`
|
||||
echo Silence is golden
|
||||
|
||||
# reserve 1GiB, truncate at 100bytes
|
||||
xfs_io -f -c 'resvsp 0 1g' -c 'truncate 100' $SCRATCH_MNT/ouch
|
||||
$XFS_IO_PROG -f -c 'resvsp 0 1g' -c 'truncate 100' $SCRATCH_MNT/ouch
|
||||
rm -f $SCRATCH_MNT/ouch
|
||||
|
||||
# reserve 1GiB, truncate at 1GiB
|
||||
xfs_io -f -c 'resvsp 0 1g' -c 'truncate 1g' $SCRATCH_MNT/ouch
|
||||
$XFS_IO_PROG -f -c 'resvsp 0 1g' -c 'truncate 1g' $SCRATCH_MNT/ouch
|
||||
rm -f $SCRATCH_MNT/ouch
|
||||
|
||||
# reserve 1GiB, truncate at 2GiB
|
||||
xfs_io -f -c 'resvsp 0 1g' -c 'truncate 2g' $SCRATCH_MNT/ouch
|
||||
$XFS_IO_PROG -f -c 'resvsp 0 1g' -c 'truncate 2g' $SCRATCH_MNT/ouch
|
||||
rm -f $SCRATCH_MNT/ouch
|
||||
|
||||
# reserve 1GiB, 1GiB hole, reserve 1MiB, truncate at 3GiB
|
||||
xfs_io -f -c 'resvsp 0 1g' -c 'resvsp 2g 1m' -c 'truncate 3g' $SCRATCH_MNT/ouch
|
||||
$XFS_IO_PROG -f -c 'resvsp 0 1g' -c 'resvsp 2g 1m' -c 'truncate 3g' $SCRATCH_MNT/ouch
|
||||
rm -f $SCRATCH_MNT/ouch
|
||||
|
||||
# success, all done
|
||||
|
||||
@@ -95,7 +95,7 @@ _grow_loop()
|
||||
| _filter_mkfs 2>/dev/null
|
||||
|
||||
echo "*** extend loop file"
|
||||
xfs_io -c "pwrite $new_size $bsize" $LOOP_DEV | _filter_io
|
||||
$XFS_IO_PROG -c "pwrite $new_size $bsize" $LOOP_DEV | _filter_io
|
||||
echo "*** mount loop filesystem"
|
||||
mount -t xfs -o loop $LOOP_DEV $LOOP_MNT
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ realtime_direct_aligned()
|
||||
echo direct realtime writes, 4 files, 2m each, increasing offsets.
|
||||
for i in 0 1 2 3
|
||||
do
|
||||
xfs_io -fdxR $SCRATCH_MNT/rt-direct-$1-$i \
|
||||
$XFS_IO_PROG -fdxR $SCRATCH_MNT/rt-direct-$1-$i \
|
||||
-c "extsize $1" -c "pwrite ${i}m 1m" \
|
||||
| _filter_io
|
||||
done
|
||||
@@ -96,7 +96,7 @@ realtime_buffer_aligned()
|
||||
echo buffered realtime writes, 4 files, 2m each, increasing offsets.
|
||||
for i in 0 1 2 3
|
||||
do
|
||||
xfs_io -fxR $SCRATCH_MNT/rt-buffera-$1-$i \
|
||||
$XFS_IO_PROG -fxR $SCRATCH_MNT/rt-buffera-$1-$i \
|
||||
-c "extsize $1" -c "pwrite ${i}m 1m" \
|
||||
| _filter_io
|
||||
done
|
||||
@@ -108,7 +108,7 @@ realtime_buffer_unaligned()
|
||||
echo buffered realtime writes, 4 files, unaligned byte offsets/sizes.
|
||||
for i in 0 1 2 3
|
||||
do
|
||||
xfs_io -fxR $SCRATCH_MNT/rt-bufferu-$1-$i \
|
||||
$XFS_IO_PROG -fxR $SCRATCH_MNT/rt-bufferu-$1-$i \
|
||||
-c "extsize $1" -c "pwrite $i 1" \
|
||||
| _filter_io
|
||||
done
|
||||
@@ -120,7 +120,7 @@ realtime_mmap_unaligned()
|
||||
# mmap realtime writes, 4 files, unaligned byte offsets/sizes.
|
||||
for i in 0 1 2 3
|
||||
do
|
||||
xfs_io -fxR $SCRATCH_MNT/rt-mmap-$1-$i \
|
||||
$XFS_IO_PROG -fxR $SCRATCH_MNT/rt-mmap-$1-$i \
|
||||
-c "extsize $1" -c "pwrite $i 1" \
|
||||
| _filter_io
|
||||
done
|
||||
|
||||
@@ -93,20 +93,20 @@ mkdir $SCRATCH_MNT/testdir
|
||||
# unset inode attribute, create files below and check they're not realtime
|
||||
|
||||
echo "*** create directory with rtinherit"
|
||||
xfs_io -r -c 'chattr +R' $SCRATCH_MNT/testdir
|
||||
xfs_io -r -c 'lsattr' $SCRATCH_MNT/testdir | _filter_scratch
|
||||
$XFS_IO_PROG -r -c 'chattr +R' $SCRATCH_MNT/testdir
|
||||
$XFS_IO_PROG -r -c 'lsattr' $SCRATCH_MNT/testdir | _filter_scratch
|
||||
|
||||
echo "*** create child with inherited realtime"
|
||||
touch $SCRATCH_MNT/testdir/realtime
|
||||
xfs_io -r -c 'lsattr' $SCRATCH_MNT/testdir/realtime | _filter_scratch
|
||||
$XFS_IO_PROG -r -c 'lsattr' $SCRATCH_MNT/testdir/realtime | _filter_scratch
|
||||
|
||||
echo "*** remove rtinherit from directory"
|
||||
xfs_io -r -c 'chattr -R' $SCRATCH_MNT/testdir
|
||||
xfs_io -r -c 'lsattr' $SCRATCH_MNT/testdir | _filter_scratch
|
||||
$XFS_IO_PROG -r -c 'chattr -R' $SCRATCH_MNT/testdir
|
||||
$XFS_IO_PROG -r -c 'lsattr' $SCRATCH_MNT/testdir | _filter_scratch
|
||||
|
||||
echo "*** create child without inherited realtime"
|
||||
touch $SCRATCH_MNT/testdir/non-realtime
|
||||
xfs_io -r -c 'lsattr' $SCRATCH_MNT/testdir/non-realtime | _filter_scratch
|
||||
$XFS_IO_PROG -r -c 'lsattr' $SCRATCH_MNT/testdir/non-realtime | _filter_scratch
|
||||
|
||||
echo "*** done"
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ _create_scratch
|
||||
echo "*** testing nosymlinks directories"
|
||||
mkdir $SCRATCH_MNT/nosymlinks
|
||||
echo "*** setting nosymlinks bit"
|
||||
xfs_io -r -c 'chattr +n' -c lsattr $SCRATCH_MNT/nosymlinks \
|
||||
$XFS_IO_PROG -r -c 'chattr +n' -c lsattr $SCRATCH_MNT/nosymlinks \
|
||||
| _filter_scratch
|
||||
touch $SCRATCH_MNT/nosymlinks/source
|
||||
ln -s $SCRATCH_MNT/nosymlinks/source $SCRATCH_MNT/nosymlinks/target 2>&1 \
|
||||
@@ -96,7 +96,7 @@ echo "*** 1st listing..."
|
||||
find $SCRATCH_MNT | _filter_scratch
|
||||
|
||||
echo "*** clearing nosymlinks bit"
|
||||
xfs_io -r -c 'chattr -n' -c lsattr $SCRATCH_MNT/nosymlinks | _filter_scratch
|
||||
$XFS_IO_PROG -r -c 'chattr -n' -c lsattr $SCRATCH_MNT/nosymlinks | _filter_scratch
|
||||
ln -s $SCRATCH_MNT/nosymlinks/source $SCRATCH_MNT/nosymlinks/target
|
||||
ln $SCRATCH_MNT/nosymlinks/source $SCRATCH_MNT/nosymlinks/hardlinksareok2
|
||||
|
||||
@@ -108,12 +108,12 @@ echo "*** finished testing nosymlinks directories"
|
||||
|
||||
# echo "*** testing inherited project IDs"
|
||||
# mkdir $SCRATCH_MNT/projectids
|
||||
# xfs_io -r -c 'chattr +P' -c lsattr -c 'chproj 42' $SCRATCH_MNT/projectids\
|
||||
# $XFS_IO_PROG -r -c 'chattr +P' -c lsattr -c 'chproj 42' $SCRATCH_MNT/projectids\
|
||||
# | _filter_scratch
|
||||
# mkdir -p $SCRATCH_MNT/projectids/a/b
|
||||
# touch $SCRATCH_MNT/projectids/a/b/c
|
||||
# xfs_io -r -c 'lsattr -R' $SCRATCH_MNT/projectids
|
||||
# xfs_io -r -c 'lsproj' $SCRATCH_MNT/projectids/a $SCRATCH_MNT/projectids/a/b/c\
|
||||
# $XFS_IO_PROG -r -c 'lsattr -R' $SCRATCH_MNT/projectids
|
||||
# $XFS_IO_PROG -r -c 'lsproj' $SCRATCH_MNT/projectids/a $SCRATCH_MNT/projectids/a/b/c\
|
||||
# | _filter_scratch
|
||||
# echo "*** 3rd listing..."
|
||||
# find $SCRATCH_MNT | _filter_scratch
|
||||
|
||||
@@ -66,7 +66,7 @@ _create_scratch()
|
||||
|
||||
_fill_scratch()
|
||||
{
|
||||
xfs_io -f -c "resvsp 0 ${1}" $SCRATCH_MNT/resvfile
|
||||
$XFS_IO_PROG -f -c "resvsp 0 ${1}" $SCRATCH_MNT/resvfile
|
||||
}
|
||||
|
||||
_stress_scratch()
|
||||
|
||||
@@ -75,7 +75,7 @@ uid=255
|
||||
gid=254
|
||||
prid=253
|
||||
rm -f $SCRATCH_MNT/resv
|
||||
xfs_io -fc "resvsp 0 200m" -c "chproj $prid" $SCRATCH_MNT/resv
|
||||
$XFS_IO_PROG -fc "resvsp 0 200m" -c "chproj $prid" $SCRATCH_MNT/resv
|
||||
chown $uid $SCRATCH_MNT/resv
|
||||
chgrp $gid $SCRATCH_MNT/resv
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ xfs_quota -c 'project -c 6' $QARGS | filter_xfs_quota
|
||||
|
||||
echo "### deny a hard link - wrong project ID"
|
||||
rm -f $SCRATCH_MNT/outer $target/inner
|
||||
xfs_io -f -c 'chproj 789' $SCRATCH_MNT/outer
|
||||
$XFS_IO_PROG -f -c 'chproj 789' $SCRATCH_MNT/outer
|
||||
ln $SCRATCH_MNT/outer $target/inner 2>/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
echo hard link succeeded
|
||||
@@ -118,7 +118,7 @@ fi
|
||||
xfs_quota -c 'quota -ip 6' $QARGS | filter_xfs_quota
|
||||
|
||||
echo "### allow a hard link - right project ID"
|
||||
xfs_io -c 'chproj 6' $SCRATCH_MNT/outer
|
||||
$XFS_IO_PROG -c 'chproj 6' $SCRATCH_MNT/outer
|
||||
ln $SCRATCH_MNT/outer $target/inner
|
||||
if [ $? -eq 0 ]; then
|
||||
echo hard link succeeded
|
||||
|
||||
@@ -69,12 +69,12 @@ test_files()
|
||||
{
|
||||
echo; echo "### create files, setting up ownership (type=$type)"
|
||||
rm -f $SCRATCH_MNT/{buffer,direct,mmap}
|
||||
xfs_io -fc "chproj $prid" $SCRATCH_MNT/{buffer,direct,mmap}
|
||||
$XFS_IO_PROG -fc "chproj $prid" $SCRATCH_MNT/{buffer,direct,mmap}
|
||||
chown $uid $SCRATCH_MNT/{buffer,direct,mmap}
|
||||
chgrp $gid $SCRATCH_MNT/{buffer,direct,mmap}
|
||||
for file in $SCRATCH_MNT/{buffer,direct,mmap}; do
|
||||
$here/src/lstat64 $file | head -3 | filter_scratch
|
||||
xfs_io -c lsproj $file
|
||||
$XFS_IO_PROG -c lsproj $file
|
||||
done
|
||||
}
|
||||
|
||||
@@ -82,11 +82,11 @@ test_accounting()
|
||||
{
|
||||
echo "### some controlled buffered, direct and mmapd IO (type=$type)"
|
||||
echo "--- initiating parallel IO..." >>$seq.full
|
||||
xfs_io -c 'pwrite -b 1m 0 16m' -c 'fsync' \
|
||||
$XFS_IO_PROG -c 'pwrite -b 1m 0 16m' -c 'fsync' \
|
||||
$SCRATCH_MNT/buffer >>$seq.full 2>&1 &
|
||||
xfs_io -c 'pwrite -b 1m 0 16m' -d \
|
||||
$XFS_IO_PROG -c 'pwrite -b 1m 0 16m' -d \
|
||||
$SCRATCH_MNT/direct >>$seq.full 2>&1 &
|
||||
xfs_io -c 't 16m' -c 'mm -rw 0 16m' -c 'mw 0 16m' -c 'ms -s' \
|
||||
$XFS_IO_PROG -c 't 16m' -c 'mm -rw 0 16m' -c 'mw 0 16m' -c 'ms -s' \
|
||||
$SCRATCH_MNT/mmap >>$seq.full 2>&1 &
|
||||
wait
|
||||
echo "--- completed parallel IO ($type)" >>$seq.full
|
||||
|
||||
@@ -151,6 +151,8 @@ export XFS_LOGPRINT_PROG="`set_prog_path xfs_logprint`"
|
||||
export XFS_REPAIR_PROG="`set_prog_path xfs_repair`"
|
||||
export XFS_CHECK_PROG="`set_prog_path xfs_check`"
|
||||
export XFS_DB_PROG="`set_prog_path xfs_db`"
|
||||
export XFS_GROWFS_PROG=`set_prog_path xfs_growfs`
|
||||
export XFS_IO_PROG="`set_prog_path xfs_io`"
|
||||
|
||||
case "$HOSTOS" in
|
||||
IRIX*)
|
||||
|
||||
Reference in New Issue
Block a user