2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2014 Red Hat, Inc. All Rights Reserved.
5 # FS QA Test No. generic/031
7 # Test non-aligned writes against fcollapse to ensure that partial pages are
8 # correctly written and aren't left behind causing invalidation or data
12 _begin_fstest auto quick prealloc rw collapse
14 # Import common functions.
17 # real QA test starts here
19 # Modify as appropriate.
22 _require_xfs_io_command "fcollapse"
24 testfile=$SCRATCH_MNT/testfile
26 _scratch_mkfs > /dev/null 2>&1
30 -c "pwrite 185332 55756" \
31 -c "fcollapse 28672 40960" \
32 -c "pwrite 133228 63394" \
33 -c "fcollapse 0 4096" \
34 $testfile | _filter_xfs_io
36 echo "==== Pre-Remount ==="
39 echo "==== Post-Remount =="