2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2013 Red Hat, Inc. All Rights Reserved.
7 # ENOSPC in fallocate(2) could corrupt ext4 when file size > 4G
9 # Regression test for commit
10 # 29ae07b ext4: Fix overflow caused by missing cast in ext4_fallocate()
13 seqres=$RESULT_DIR/$seq
14 echo "QA output created by $seq"
18 status=1 # failure is the default!
19 trap "_cleanup; exit \$status" 0 1 2 3 15
27 # get standard environment, filters and checks
31 # real QA test starts here
34 _require_xfs_io_command "falloc"
41 _scratch_mkfs_sized $fssize >>$seqres.full 2>&1
42 _scratch_mount >>$seqres.full 2>&1
44 echo "Silence is golden"
46 # fallocate(2) a 6G(> 4G) file on a 5G fs
47 $XFS_IO_PROG -f -c "falloc 0 6g" $SCRATCH_MNT/testfile.$seq >>$seqres.full 2>&1