2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2015 Red Hat, Inc., Lukas Czerner <lczerner@redhat.com>
7 # Exercise the situation that cause ext4 to BUG_ON() when we use
8 # zero range to zero a range which starts within the isize but ends
9 # past the isize but still in the same block. This particular problem
10 # has only been seen on systems with page_size > block_size.
13 _begin_fstest auto prealloc quick zero
15 # Import common functions.
18 # real QA test starts here
21 _require_xfs_io_command "fzero"
23 echo "Silence is golden"
25 # Use smaller scratch fs to shorten the test time
26 _scratch_mkfs_sized $((512 * 1024 * 1024)) >>$seqres.full 2>&1
29 testfile=$SCRATCH_MNT/$seq.$$
30 $XFS_IO_PROG -f -c "pwrite 4096 512" -c "fzero 4351 512" $testfile >> $seqres.full 2>&1