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
41 _scratch_mkfs >> $seqres.full 2>&1
42 _scratch_mount "-o compress=lzo"
44 $XFS_IO_PROG -f -c "pwrite 0 10M" -c "fsync" \
45 $SCRATCH_MNT/data >> $seqres.full 2>&1
47 _extent_count $SCRATCH_MNT/data
49 $XFS_IO_PROG -f -c "pwrite 0 $((4096*33))" -c "fsync" \
50 $SCRATCH_MNT/data >> $seqres.full 2>&1
52 $XFS_IO_PROG -f -c "pwrite 0 10M" -c "fsync" \
53 $SCRATCH_MNT/data >> $seqres.full 2>&1
55 _extent_count $SCRATCH_MNT/data