2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2014 Wang Shilong. All Rights Reserved.
5 # FS QA Test No. btrfs/076
7 # Regression test for btrfs incorrect inode ratio detection.
8 # This was fixed in the following linux kernel patch:
10 # Btrfs: fix incorrect compression ratio detection
13 seqres=$RESULT_DIR/$seq
14 echo "QA output created by $seq"
19 status=1 # failure is the default!
20 trap "_cleanup; exit \$status" 0 1 2 3 15
28 # get standard environment, filters and checks
33 # real QA test starts here
40 _scratch_mkfs >> $seqres.full 2>&1
41 _scratch_mount "-o compress=lzo"
43 $XFS_IO_PROG -f -c "pwrite 0 10M" -c "fsync" \
44 $SCRATCH_MNT/data >> $seqres.full 2>&1
46 _extent_count $SCRATCH_MNT/data
48 $XFS_IO_PROG -f -c "pwrite 0 $((4096*33))" -c "fsync" \
49 $SCRATCH_MNT/data >> $seqres.full 2>&1
51 $XFS_IO_PROG -f -c "pwrite 0 10M" -c "fsync" \
52 $SCRATCH_MNT/data >> $seqres.full 2>&1
54 _extent_count $SCRATCH_MNT/data