map_cmd=$4
filter_cmd=$5
testfile=$6
- xfs_io_opt=$7 #needs to be -F if not testing xfs
echo " 1. into a hole"
if [ "$remove_testfile" ]; then
rm -f $testfile
fi
- $XFS_IO_PROG $xfs_io_opt -f -c "truncate 20k" \
+ $XFS_IO_PROG -f -c "truncate 20k" \
-c "$zero_cmd 4k 8k" \
-c "$map_cmd -v" $testfile | $filter_cmd
[ $? -ne 0 ] && die_now
if [ "$remove_testfile" ]; then
rm -f $testfile
fi
- $XFS_IO_PROG $xfs_io_opt -f -c "truncate 20k" \
+ $XFS_IO_PROG -f -c "truncate 20k" \
-c "pwrite 0 20k" $sync_cmd \
-c "$zero_cmd 4k 8k" \
-c "$map_cmd -v" $testfile | $filter_cmd
if [ "$remove_testfile" ]; then
rm -f $testfile
fi
- $XFS_IO_PROG $xfs_io_opt -f -c "truncate 20k" \
+ $XFS_IO_PROG -f -c "truncate 20k" \
-c "$alloc_cmd 0 20k" \
-c "$zero_cmd 4k 8k" \
-c "$map_cmd -v" $testfile | $filter_cmd
if [ "$remove_testfile" ]; then
rm -f $testfile
fi
- $XFS_IO_PROG $xfs_io_opt -f -c "truncate 20k" \
+ $XFS_IO_PROG -f -c "truncate 20k" \
-c "pwrite 8k 8k" $sync_cmd \
-c "$zero_cmd 4k 8k" \
-c "$map_cmd -v" $testfile | $filter_cmd
if [ "$remove_testfile" ]; then
rm -f $testfile
fi
- $XFS_IO_PROG $xfs_io_opt -f -c "truncate 20k" \
+ $XFS_IO_PROG -f -c "truncate 20k" \
-c "$alloc_cmd 8k 8k" \
-c "$zero_cmd 4k 8k" \
-c "$map_cmd -v" $testfile | $filter_cmd
if [ "$remove_testfile" ]; then
rm -f $testfile
fi
- $XFS_IO_PROG $xfs_io_opt -f -c "truncate 20k" \
+ $XFS_IO_PROG -f -c "truncate 20k" \
-c "pwrite 0 8k" $sync_cmd \
-c "$zero_cmd 4k 8k" \
-c "$map_cmd -v" $testfile | $filter_cmd
if [ "$remove_testfile" ]; then
rm -f $testfile
fi
- $XFS_IO_PROG $xfs_io_opt -f -c "truncate 20k" \
+ $XFS_IO_PROG -f -c "truncate 20k" \
-c "pwrite 0 8k" $sync_cmd \
-c "$alloc_cmd 8k 8k" \
-c "$zero_cmd 4k 8k" \
if [ "$remove_testfile" ]; then
rm -f $testfile
fi
- $XFS_IO_PROG $xfs_io_opt -f -c "truncate 20k" \
+ $XFS_IO_PROG -f -c "truncate 20k" \
-c "$alloc_cmd 0 8k" \
-c "$zero_cmd 4k 8k" \
-c "$map_cmd -v" $testfile | $filter_cmd
if [ "$remove_testfile" ]; then
rm -f $testfile
fi
- $XFS_IO_PROG $xfs_io_opt -f -c "truncate 20k" \
+ $XFS_IO_PROG -f -c "truncate 20k" \
-c "$alloc_cmd 0 8k" \
-c "pwrite 8k 8k" $sync_cmd \
-c "$zero_cmd 4k 8k" \
if [ "$remove_testfile" ]; then
rm -f $testfile
fi
- $XFS_IO_PROG $xfs_io_opt -f -c "truncate 20k" \
+ $XFS_IO_PROG -f -c "truncate 20k" \
-c "pwrite 8k 4k" $sync_cmd \
-c "$zero_cmd 4k 12k" \
-c "$map_cmd -v" $testfile | $filter_cmd
if [ "$remove_testfile" ]; then
rm -f $testfile
fi
- $XFS_IO_PROG $xfs_io_opt -f -c "truncate 20k" \
+ $XFS_IO_PROG -f -c "truncate 20k" \
-c "$alloc_cmd 0 20k" \
-c "pwrite 0 8k" \
-c "pwrite 12k 8k" $sync_cmd \
if [ "$remove_testfile" ]; then
rm -f $testfile
fi
- $XFS_IO_PROG $xfs_io_opt -f -c "truncate 20k" \
+ $XFS_IO_PROG -f -c "truncate 20k" \
-c "$alloc_cmd 0 20k" \
-c "pwrite 8k 4k" $sync_cmd \
-c "$zero_cmd 4k 12k" \
if [ "$remove_testfile" ]; then
rm -f $testfile
fi
- $XFS_IO_PROG $xfs_io_opt -f -c "truncate 20k" \
+ $XFS_IO_PROG -f -c "truncate 20k" \
-c "$alloc_cmd 0 20k" \
-c "pwrite 0k 8k" $sync_cmd \
-c "pwrite 12k 8k" -c "fsync" \
echo " 14. data -> hole @ EOF"
rm -f $testfile
- $XFS_IO_PROG $xfs_io_opt -f -c "truncate 20k" \
+ $XFS_IO_PROG -f -c "truncate 20k" \
-c "pwrite 0 20k" $sync_cmd \
-c "$zero_cmd 12k 8k" \
-c "$map_cmd -v" $testfile | $filter_cmd
if [ "$remove_testfile" ]; then
rm -f $testfile
fi
- $XFS_IO_PROG $xfs_io_opt -f -c "truncate 20k" \
+ $XFS_IO_PROG -f -c "truncate 20k" \
-c "pwrite 0 20k" $sync_cmd \
-c "$zero_cmd 0k 8k" \
-c "$map_cmd -v" $testfile | $filter_cmd
else
cp $testfile $testfile.2
fi
- $XFS_IO_PROG $xfs_io_opt -f -c "truncate 20k" \
+ $XFS_IO_PROG -f -c "truncate 20k" \
-c "pwrite 8k 12k" -c "fsync" $testfile.2 \
> /dev/null
- $XFS_IO_PROG $xfs_io_opt -f -c "truncate 20k" \
+ $XFS_IO_PROG -f -c "truncate 20k" \
-c "pwrite 0 20k" $sync_cmd \
-c "$zero_cmd 0k 8k" \
-c "fadvise -d" \
rm -f $testfile
fi
block_size=`stat -f $TEST_DEV | grep "Block size" | cut -d " " -f3`
- $XFS_IO_PROG $xfs_io_opt -f -c "truncate $block_size" \
+ $XFS_IO_PROG -f -c "truncate $block_size" \
-c "pwrite 0 $block_size" $sync_cmd \
-c "$zero_cmd 128 128" \
-c "$map_cmd -v" $testfile | $filter_cmd