Distros(eg. RHEL5) with older version of coreutils have no truncate(1)
command. Use xfs_io instead to avoid "command not found" failures.
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
dd if=/dev/zero of=$SCRATCH_MNT/file bs=4k count=1 seek=$((i*10))
done
# truncate last extent
-truncate $SCRATCH_MNT/file --size $((4096* 200))
+$XFS_IO_PROG -F -f -c "truncate $((4096*200))" $SCRATCH_MNT/file
if ! _scratch_unmount; then
echo "failed to umount"