@@ -2771,7 +2771,7 @@ _require_xfs_io_command()
_notrun "xfs_io $command $param kernel support is missing"
param_checked="$param"
;;
- "swapext")
+ "swapext"|"exchangerange")
$XFS_IO_PROG -f -c 'pwrite -S 0x58 0 128k -b 128k' $testfile > /dev/null
$XFS_IO_PROG -f -c 'truncate 128k' $testfile.1 > /dev/null
testio=`$XFS_IO_PROG -c "$command $param $testfile.1" $testfile 2>&1`
@@ -1823,7 +1823,7 @@ _require_xfs_scratch_atomicswap()
{
_require_xfs_mkfs_atomicswap
_require_scratch
- _require_xfs_io_command swapext '-v exchrange -a'
+ _require_xfs_io_command exchangerange
_scratch_mkfs -m reflink=1 > /dev/null
_try_scratch_mount || \
_notrun "atomicswap dependencies not supported by scratch filesystem type: $FSTYP"
@@ -14,7 +14,7 @@ _begin_fstest auto quick fiexchange swapext quota
. ./common/quota
# real QA test starts here
-_require_xfs_io_command swapext '-v exchrange'
+_require_xfs_io_command swapext
_require_user
_require_nobody
_require_quota
@@ -14,7 +14,7 @@ _begin_fstest auto quick fiexchange swapext quota
. ./common/quota
# real QA test starts here
-_require_xfs_io_command swapext '-v exchrange'
+_require_xfs_io_command swapext
_require_user
_require_nobody
_require_quota
@@ -21,7 +21,7 @@ _cleanup()
. ./common/filter
# real QA test starts here
-_require_xfs_io_command swapext '-v exchrange'
+_require_xfs_io_command swapext
_require_test
dir=$TEST_DIR/test-$seq
@@ -21,7 +21,7 @@ _cleanup()
# real QA test starts here
_require_test_program punch-alternating
-_require_xfs_io_command swapext '-v exchrange'
+_require_xfs_io_command exchangerange
_require_test
dir=$TEST_DIR/test-$seq
@@ -21,7 +21,7 @@ _cleanup()
. ./common/reflink
# real QA test starts here
-_require_xfs_io_command swapext '-v exchrange -s 64k -l 64k'
+_require_xfs_io_command exchangerange ' -s 64k -l 64k'
_require_xfs_io_command "falloc"
_require_test
@@ -36,7 +36,7 @@ filesnap() {
test_swapext_once() {
filesnap "$1: before swapext" $dir/$3 $dir/$4
- $XFS_IO_PROG -c "swapext -v exchrange $2 $dir/$3" $dir/$4
+ $XFS_IO_PROG -c "exchangerange $2 $dir/$3" $dir/$4
filesnap "$1: after swapext" $dir/$3 $dir/$4
_test_cycle_mount
filesnap "$1: after cycling mount" $dir/$3 $dir/$4
@@ -22,7 +22,7 @@ _cleanup()
. ./common/reflink
# real QA test starts here
-_require_xfs_io_command swapext '-v exchrange'
+_require_xfs_io_command exchangerange
_require_xfs_io_command "falloc"
_require_test_reflink
@@ -37,7 +37,7 @@ filesnap() {
test_swapext_once() {
filesnap "$1: before swapext" $dir/$3 $dir/$4
- $XFS_IO_PROG -c "swapext -v exchrange $2 $dir/$3" $dir/$4
+ $XFS_IO_PROG -c "exchangerange $2 $dir/$3" $dir/$4
filesnap "$1: after swapext" $dir/$3 $dir/$4
_test_cycle_mount
filesnap "$1: after cycling mount" $dir/$3 $dir/$4
@@ -21,7 +21,7 @@ _cleanup()
. ./common/reflink
# real QA test starts here
-_require_xfs_io_command swapext '-v exchrange -s 64k -l 64k'
+_require_xfs_io_command exchangerange ' -s 64k -l 64k'
_require_test
filesnap() {
@@ -51,7 +51,7 @@ test_swapext_once() {
_pwrite_byte 0x59 0 $((blksz * b_len)) $dir/b >> $seqres.full
filesnap "$tag: before swapext" $dir/a $dir/b
- cmd="swapext -v exchrange -s $((blksz * a_off)) -d $((blksz * b_off)) $len $dir/a"
+ cmd="exchangerange -s $((blksz * a_off)) -d $((blksz * b_off)) $len $dir/a"
echo "$cmd" >> $seqres.full
$XFS_IO_PROG -c "$cmd" $dir/b
filesnap "$tag: after swapext" $dir/a $dir/b
@@ -24,7 +24,7 @@ _cleanup()
. ./common/reflink
# real QA test starts here
-_require_xfs_io_command swapext '-v exchrange'
+_require_xfs_io_command exchangerange
_require_xfs_io_command startupdate
_require_test_reflink
_require_test
@@ -21,7 +21,7 @@ _cleanup()
. ./common/reflink
# real QA test starts here
-_require_xfs_io_command swapext '-v exchrange'
+_require_xfs_io_command exchangerange
_require_xfs_io_command startupdate
_require_test
_require_scratch
@@ -21,7 +21,7 @@ _cleanup()
. ./common/reflink
# real QA test starts here
-_require_xfs_io_command swapext '-v exchrange'
+_require_xfs_io_command exchangerange
_require_test
dir=$TEST_DIR/test-$seq
@@ -23,7 +23,7 @@ _cleanup()
. ./common/filter
# real QA test starts here
-_require_xfs_io_command swapext '-v exchrange'
+_require_xfs_io_command exchangerange
_require_xfs_io_command startupdate '-e'
_require_test
@@ -20,7 +20,7 @@ _cleanup()
. ./common/filter
# real QA test starts here
-_require_xfs_io_command swapext '-v exchrange'
+_require_xfs_io_command exchangerange
_require_test_program punch-alternating
_require_test
@@ -23,7 +23,7 @@ _cleanup()
# real QA test starts here
_require_test_program "punch-alternating"
-_require_xfs_io_command swapext '-v exchrange -a'
+_require_xfs_io_command exchangerange
_require_scratch
_require_scratch_shutdown
@@ -43,7 +43,7 @@ od -tx1 -Ad -c $SCRATCH_MNT/a > /tmp/a0
od -tx1 -Ad -c $SCRATCH_MNT/b > /tmp/b0
echo swap >> $seqres.full
-$XFS_IO_PROG -c "swapext -v exchrange -a -e -f -u $SCRATCH_MNT/a" $SCRATCH_MNT/b
+$XFS_IO_PROG -c "exchangerange -e -f -u $SCRATCH_MNT/a" $SCRATCH_MNT/b
_scratch_shutdown
_scratch_cycle_mount
@@ -22,7 +22,7 @@ _cleanup()
# real QA test starts here
_require_test_program "punch-alternating"
-_require_xfs_io_command swapext '-v exchrange'
+_require_xfs_io_command exchangerange
_require_scratch
_scratch_mkfs >> $seqres.full
@@ -41,7 +41,7 @@ echo "md5 a: $old_a md5 b: $old_b" >> $seqres.full
# Test swapext with the -n option, which will do all the input parameter
# checking and return 0 without changing anything.
echo dry run swap >> $seqres.full
-$XFS_IO_PROG -c "swapext -v exchrange -n -f -u $SCRATCH_MNT/a" $SCRATCH_MNT/b
+$XFS_IO_PROG -c "exchangerange -n -f -u $SCRATCH_MNT/a" $SCRATCH_MNT/b
_scratch_cycle_mount
new_a=$(md5sum $SCRATCH_MNT/a | awk '{print $1}')
@@ -54,7 +54,7 @@ test $old_b = $new_b || echo "scratch file B should not have swapped"
# Do it again, but without the -n option, to prove that we can actually
# swap the file contents.
echo actual swap >> $seqres.full
-$XFS_IO_PROG -c "swapext -v exchrange -f -u $SCRATCH_MNT/a" $SCRATCH_MNT/b
+$XFS_IO_PROG -c "exchangerange -f -u $SCRATCH_MNT/a" $SCRATCH_MNT/b
_scratch_cycle_mount
new_a=$(md5sum $SCRATCH_MNT/a | awk '{print $1}')
@@ -22,7 +22,7 @@ _cleanup()
. ./common/filter
# real QA test starts here
-_require_xfs_io_command swapext '-v exchrange -a'
+_require_xfs_io_command exchangerange
_require_scratch
_scratch_mkfs >> $seqres.full
@@ -42,7 +42,7 @@ md5sum $SCRATCH_MNT/b | _filter_scratch
# Test swapext. -h means skip holes in /b, and -e means operate to EOF
echo swap | tee -a $seqres.full
-$XFS_IO_PROG -c "swapext -v exchrange -f -u -h -e -a $SCRATCH_MNT/b" $SCRATCH_MNT/a
+$XFS_IO_PROG -c "exchangerange -f -u -h -e $SCRATCH_MNT/b" $SCRATCH_MNT/a
_scratch_cycle_mount
md5sum $SCRATCH_MNT/a | _filter_scratch
@@ -22,7 +22,7 @@ _cleanup()
. ./common/filter
# real QA test starts here
-_require_xfs_io_command swapext '-v exchrange -a'
+_require_xfs_io_command exchangerange
_require_xfs_io_command startupdate '-e'
_require_scratch
@@ -25,7 +25,7 @@ _begin_fstest auto fiexchange swapext quick
# Modify as appropriate.
_supported_fs generic
_require_user
-_require_xfs_io_command swapext '-v exchrange -a'
+_require_xfs_io_command exchangerange
_require_xfs_io_command startupdate
_require_scratch
@@ -28,7 +28,7 @@ _supported_fs generic
_require_user
_require_command "$GETCAP_PROG" getcap
_require_command "$SETCAP_PROG" setcap
-_require_xfs_io_command swapext '-v exchrange -a'
+_require_xfs_io_command exchangerange
_require_xfs_io_command startupdate
_require_scratch
_require_attrs security
@@ -21,7 +21,7 @@ _cleanup()
# real QA test starts here
_supported_fs xfs
-_require_xfs_io_command swapext '-v exchrange'
+_require_xfs_io_command swapext
_require_test
# We can't do any reasonable swapping if the files we're going to create are
@@ -24,7 +24,7 @@ _cleanup()
# real QA test starts here
_supported_fs xfs
-_require_xfs_io_command swapext '-v exchrange -a'
+_require_xfs_io_command exchangerange
_require_test_program "punch-alternating"
_require_xfs_io_command startupdate
_require_xfs_io_error_injection "bmap_finish_one"
@@ -25,7 +25,7 @@ _cleanup()
# real QA test starts here
_supported_fs xfs
-_require_xfs_io_command swapext '-v exchrange -a'
+_require_xfs_io_command exchangerange
_require_xfs_scratch_atomicswap
_require_xfs_io_error_injection "bmap_finish_one"
@@ -48,7 +48,7 @@ md5sum $SCRATCH_MNT/b | _filter_scratch
# Test swapext. -h means skip holes in /b, and -e means operate to EOF
echo swap | tee -a $seqres.full
$XFS_IO_PROG -x -c 'inject bmap_finish_one' \
- -c "swapext -v exchrange -f -u -h -e -a $SCRATCH_MNT/b" $SCRATCH_MNT/a
+ -c "exchangerange -f -u -h -e $SCRATCH_MNT/b" $SCRATCH_MNT/a
_scratch_cycle_mount
md5sum $SCRATCH_MNT/a | _filter_scratch
@@ -25,7 +25,7 @@ _cleanup()
# real QA test starts here
_supported_fs xfs
-_require_xfs_io_command swapext '-v exchrange -a'
+_require_xfs_io_command exchangerange
_require_xfs_io_command startupdate '-e'
_require_xfs_scratch_atomicswap
_require_xfs_io_error_injection "bmap_finish_one"