2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (C) 2018 CTERA Networks. All Rights Reserved.
7 # Test first read with freeze right after mount.
9 # With ext4, this leads to freeze proection bypass WARN_ON in
10 # ext4_journal_check_start.
13 seqres=$RESULT_DIR/$seq
14 echo "QA output created by $seq"
18 status=1 # failure is the default!
19 trap "_cleanup; exit \$status" 0 1 2 3 15
27 # get standard environment, filters and checks
31 # real QA test starts here
36 _require_command "$TIMEOUT_PROG" "timeout"
40 testfile=$SCRATCH_MNT/foo
42 # Create a filesystem with a file
43 _scratch_mkfs >>$seqres.full 2>&1
45 echo "frozen" > $testfile
47 # Mount filesystem "noatime" and freeze right after mount -
48 # reads should not block
49 _scratch_cycle_mount "noatime"
50 xfs_freeze -f $SCRATCH_MNT
52 # Read file while filesystem is frozen should succeed
54 $TIMEOUT_PROG -s KILL 1s cat $testfile
56 xfs_freeze -u $SCRATCH_MNT