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 _begin_fstest auto quick prealloc enospc
15 # Import common functions.
18 # real QA test starts here
20 _require_xfs_io_command "falloc"
26 _scratch_mkfs_sized $fssize >>$seqres.full 2>&1
27 _scratch_mount >>$seqres.full 2>&1
29 echo "Silence is golden"
31 # fallocate(2) a 6G(> 4G) file on a 5G fs
32 $XFS_IO_PROG -f -c "falloc 0 6g" $SCRATCH_MNT/testfile.$seq >>$seqres.full 2>&1