]> www.infradead.org Git - users/hch/xfstests-dev.git/commitdiff
misc: update xfs_io swapext usage
authorDarrick J. Wong <djwong@kernel.org>
Thu, 16 Nov 2023 17:30:43 +0000 (09:30 -0800)
committerZorro Lang <zlang@kernel.org>
Thu, 16 Nov 2023 19:01:37 +0000 (03:01 +0800)
Since the new 'exchange range' functionality is no longer a VFS level
concept, the xfs_io swapext -v options have changed.  Update fstests to
reflect this new reality.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
23 files changed:
common/xfs
tests/generic/709
tests/generic/710
tests/generic/711
tests/generic/712
tests/generic/713
tests/generic/714
tests/generic/715
tests/generic/716
tests/generic/717
tests/generic/718
tests/generic/719
tests/generic/720
tests/generic/722
tests/generic/723
tests/generic/724
tests/generic/725
tests/generic/726
tests/generic/727
tests/xfs/789
tests/xfs/790
tests/xfs/791
tests/xfs/792

index c7671f8f9d17f5aaa2dbc6a80271ac75e314d3ba..f53b33fc54f707a07a6f719ba75f27eb9d71c63a 100644 (file)
@@ -1802,7 +1802,7 @@ _require_xfs_scratch_atomicswap()
 {
        _require_xfs_mkfs_atomicswap
        _require_scratch
-       _require_xfs_io_command swapext '-v vfs -a'
+       _require_xfs_io_command swapext '-v exchrange -a'
        _scratch_mkfs -m reflink=1 > /dev/null
        _try_scratch_mount || \
                _notrun "atomicswap dependencies not supported by scratch filesystem type: $FSTYP"
index 3dbce2c287215c2a3821e2e80849c4184cd5dbc6..4bd591b873d8edad0612c049938ac6ba79accb2b 100755 (executable)
@@ -14,7 +14,7 @@ _begin_fstest auto quick fiexchange swapext quota
 . ./common/quota
 
 # real QA test starts here
-_require_xfs_io_command swapext '-v vfs'
+_require_xfs_io_command swapext '-v exchrange'
 _require_user
 _require_nobody
 _require_quota
index dc4a999a1d39ae40028eaa30f4f3fd71199339e7..c7fca05d4c0ef2e9507d770054c5710fda658ff3 100755 (executable)
@@ -14,7 +14,7 @@ _begin_fstest auto quick fiexchange swapext quota
 . ./common/quota
 
 # real QA test starts here
-_require_xfs_io_command swapext '-v vfs'
+_require_xfs_io_command swapext '-v exchrange'
 _require_user
 _require_nobody
 _require_quota
index a24fe22665c13168bfc8fbe3e7252aae53f6e8be..f1318b30ddb1d237dd1e1182ea1a999bc09fb025 100755 (executable)
@@ -21,7 +21,7 @@ _cleanup()
 . ./common/filter
 
 # real QA test starts here
-_require_xfs_io_command swapext '-v vfs'
+_require_xfs_io_command swapext '-v exchrange'
 _require_test
 
 dir=$TEST_DIR/test-$seq
index 13008c5bc2581d724b9322ba2d26bf649a37fac6..d4a705478eca23a783bbdc53ccd662357b4e1bde 100755 (executable)
@@ -21,7 +21,7 @@ _cleanup()
 
 # real QA test starts here
 _require_test_program punch-alternating
-_require_xfs_io_command swapext '-v vfs'
+_require_xfs_io_command swapext '-v exchrange'
 _require_test
 
 dir=$TEST_DIR/test-$seq
index bf37cd99cf604f76fb9928865f3f3c10c770d728..9b742ee0cbca2cc7351792d7a3d3b703fd2e3927 100755 (executable)
@@ -21,7 +21,7 @@ _cleanup()
 . ./common/reflink
 
 # real QA test starts here
-_require_xfs_io_command swapext '-v vfs -s 64k -l 64k'
+_require_xfs_io_command swapext '-v exchrange -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 vfs $2 $dir/$3" $dir/$4
+       $XFS_IO_PROG -c "swapext -v exchrange $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
index 190b6f2b2c43edaab90fb7118d02e374980b9c6d..b48a4b7d315ad9a130bc0ab7785a6e60652c8cf6 100755 (executable)
@@ -22,7 +22,7 @@ _cleanup()
 . ./common/reflink
 
 # real QA test starts here
-_require_xfs_io_command swapext '-v vfs'
+_require_xfs_io_command swapext '-v exchrange'
 _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 vfs $2 $dir/$3" $dir/$4
+       $XFS_IO_PROG -c "swapext -v exchrange $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
index 6005fb2d4ead1e034eee9b4e188bdf7b159a5af5..595953dfcf1598b4e5b46939f6e65536bdf1ff6e 100755 (executable)
@@ -21,7 +21,7 @@ _cleanup()
 . ./common/reflink
 
 # real QA test starts here
-_require_xfs_io_command swapext '-v vfs -s 64k -l 64k'
+_require_xfs_io_command swapext '-v exchrange -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 vfs -s $((blksz * a_off)) -d $((blksz * b_off)) $len $dir/a"
+       cmd="swapext -v exchrange -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
index 514a8b8365af0b421ae8166f62b5caedd381b16a..25976ab8984da21d942774afd7a8be7e06dbead6 100755 (executable)
@@ -24,7 +24,7 @@ _cleanup()
 . ./common/reflink
 
 # real QA test starts here
-_require_xfs_io_command swapext '-v vfs'
+_require_xfs_io_command swapext '-v exchrange'
 _require_xfs_io_command startupdate
 _require_test_reflink
 _require_test
index d1bd499e89b07b379de623c8a779660affdcdf17..2c45e715f47c6faee37078a3b3bba89c02ecaf15 100755 (executable)
@@ -21,7 +21,7 @@ _cleanup()
 . ./common/reflink
 
 # real QA test starts here
-_require_xfs_io_command swapext '-v vfs'
+_require_xfs_io_command swapext '-v exchrange'
 _require_xfs_io_command startupdate
 _require_test
 _require_scratch
index dc99347fd7b75b97cc95c8a07db2e35127ce20fa..f53d1840d0be05488989a210262bd5f6ab7c7540 100755 (executable)
@@ -21,7 +21,7 @@ _cleanup()
 . ./common/reflink
 
 # real QA test starts here
-_require_xfs_io_command swapext '-v vfs'
+_require_xfs_io_command swapext '-v exchrange'
 _require_test
 
 dir=$TEST_DIR/test-$seq
index aeb42fb7e4e4431cee261b6f95212f5e5df80863..fe0b9d082e6ce9b535e7a9c00c0906f838165040 100755 (executable)
@@ -23,7 +23,7 @@ _cleanup()
 . ./common/filter
 
 # real QA test starts here
-_require_xfs_io_command swapext '-v vfs'
+_require_xfs_io_command swapext '-v exchrange'
 _require_xfs_io_command startupdate '-e'
 _require_test
 
index a5bcc55c38489bc9950b9d482c2901f116bc9bcf..4db69c6921e49275470e829c9fe453d70d68676b 100755 (executable)
@@ -20,7 +20,7 @@ _cleanup()
 . ./common/filter
 
 # real QA test starts here
-_require_xfs_io_command swapext '-v vfs'
+_require_xfs_io_command swapext '-v exchrange'
 _require_test_program punch-alternating
 _require_test
 
index 75dc0260e16e35620d527f962341f7f44efc3dc8..40eab9bbb35c25fedb30df6ad629e97c71b0e95a 100755 (executable)
@@ -23,7 +23,7 @@ _cleanup()
 
 # real QA test starts here
 _require_test_program "punch-alternating"
-_require_xfs_io_command swapext '-v vfs -a'
+_require_xfs_io_command swapext '-v exchrange -a'
 _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 vfs -a -e -f -u $SCRATCH_MNT/a" $SCRATCH_MNT/b
+$XFS_IO_PROG -c "swapext -v exchrange -a -e -f -u $SCRATCH_MNT/a" $SCRATCH_MNT/b
 _scratch_shutdown
 _scratch_cycle_mount
 
index 5390f44269414d18d2d5485b2e840cd0576ecd95..b452de020809d338ae914c9811d01c0a36b726b2 100755 (executable)
@@ -22,7 +22,7 @@ _cleanup()
 
 # real QA test starts here
 _require_test_program "punch-alternating"
-_require_xfs_io_command swapext '-v vfs'
+_require_xfs_io_command swapext '-v exchrange'
 _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 vfs -n -f -u $SCRATCH_MNT/a" $SCRATCH_MNT/b
+$XFS_IO_PROG -c "swapext -v exchrange -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 vfs -f -u $SCRATCH_MNT/a" $SCRATCH_MNT/b
+$XFS_IO_PROG -c "swapext -v exchrange -f -u $SCRATCH_MNT/a" $SCRATCH_MNT/b
 _scratch_cycle_mount
 
 new_a=$(md5sum $SCRATCH_MNT/a | awk '{print $1}')
index 67e0dba446ba8c3b91bf4f844b54a3e141bcd8bc..12324fb1561654c25de0013e483668aa98a119f2 100755 (executable)
@@ -22,7 +22,7 @@ _cleanup()
 . ./common/filter
 
 # real QA test starts here
-_require_xfs_io_command swapext '-v vfs -a'
+_require_xfs_io_command swapext '-v exchrange -a'
 _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 vfs -f -u -h -e -a $SCRATCH_MNT/b" $SCRATCH_MNT/a
+$XFS_IO_PROG -c "swapext -v exchrange -f -u -h -e -a $SCRATCH_MNT/b" $SCRATCH_MNT/a
 _scratch_cycle_mount
 
 md5sum $SCRATCH_MNT/a | _filter_scratch
index 9b68871486de6a9cc6916cdcd4ed38afadf5d68f..bf60127b39b753a3ccf03a152e430332fed48f1e 100755 (executable)
@@ -22,7 +22,7 @@ _cleanup()
 . ./common/filter
 
 # real QA test starts here
-_require_xfs_io_command swapext '-v vfs -a'
+_require_xfs_io_command swapext '-v exchrange -a'
 _require_xfs_io_command startupdate '-e'
 _require_scratch
 
index f0d8df2e0dcde4893998938130dff5b33831ec8c..4cf18bd0e5fef033d444d525941b707ee9d61b07 100755 (executable)
@@ -25,7 +25,7 @@ _begin_fstest auto fiexchange swapext quick
 # Modify as appropriate.
 _supported_fs generic
 _require_user
-_require_xfs_io_command swapext '-v vfs -a'
+_require_xfs_io_command swapext '-v exchrange -a'
 _require_xfs_io_command startupdate
 _require_scratch
 
index 2cda49eadab391af28efd9fdf8bd3434a23d3985..af9612c967505d8acdf0672a740bbea058995b6e 100755 (executable)
@@ -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 vfs -a'
+_require_xfs_io_command swapext '-v exchrange -a'
 _require_xfs_io_command startupdate
 _require_scratch
 _require_attrs security
index 9df91ac32f2263fd3b9b086e961c961e839b94bd..b966c651193a7e1763b811beb3ae191741c53232 100755 (executable)
@@ -21,7 +21,7 @@ _cleanup()
 
 # real QA test starts here
 _supported_fs xfs
-_require_xfs_io_command swapext '-v vfs'
+_require_xfs_io_command swapext '-v exchrange'
 _require_test
 
 # We can't do any reasonable swapping if the files we're going to create are
index 2362d66dfc185ba6dddb94be7f950f369c6c0053..db6ce741d71a9d46db371be0f9b5ce3841a76fa8 100755 (executable)
@@ -24,7 +24,7 @@ _cleanup()
 
 # real QA test starts here
 _supported_fs xfs
-_require_xfs_io_command swapext '-v vfs -a'
+_require_xfs_io_command swapext '-v exchrange -a'
 _require_test_program "punch-alternating"
 _require_xfs_io_command startupdate
 _require_xfs_io_error_injection "bmap_finish_one"
index 4944c1517c09937143dd08862ac7a606e8e62697..84e3bee9b9f5e5e71b338bbb866743e89b07db6b 100755 (executable)
@@ -25,7 +25,7 @@ _cleanup()
 
 # real QA test starts here
 _supported_fs xfs
-_require_xfs_io_command swapext '-v vfs -a'
+_require_xfs_io_command swapext '-v exchrange -a'
 _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 vfs -f -u -h -e -a $SCRATCH_MNT/b" $SCRATCH_MNT/a
+       -c "swapext -v exchrange -f -u -h -e -a $SCRATCH_MNT/b" $SCRATCH_MNT/a
 _scratch_cycle_mount
 
 md5sum $SCRATCH_MNT/a | _filter_scratch
index 4af084bf669e0e16e5aaf76de6cbcf3aa06981eb..bfbfbce4aa5e8a4de520d4880f1a94efa2ea06e4 100755 (executable)
@@ -25,7 +25,7 @@ _cleanup()
 
 # real QA test starts here
 _supported_fs xfs
-_require_xfs_io_command swapext '-v vfs -a'
+_require_xfs_io_command swapext '-v exchrange -a'
 _require_xfs_io_command startupdate '-e'
 _require_xfs_scratch_atomicswap
 _require_xfs_io_error_injection "bmap_finish_one"