. ./common/filter
# real QA test starts here
-_supported_os Linux
_supported_fs generic
rm -f $seqres.full
_require_xfs_io_command "copy_range"
_require_scratch_swapfile
-_scratch_mkfs 2>&1 >> $seqres.full
+_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
rm -f $seqres.full
echo swap files return ETXTBUSY
_format_swapfile $SCRATCH_MNT/swapfile 16m
-swapon $SCRATCH_MNT/swapfile
+_swapon_file $SCRATCH_MNT/swapfile
+
$XFS_IO_PROG -f -c "copy_range -l 32k $SCRATCH_MNT/file" $SCRATCH_MNT/swapfile
swapoff $SCRATCH_MNT/swapfile