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
35 _require_command "$TIMEOUT_PROG" "timeout"
39 testfile=$SCRATCH_MNT/foo
41 # Create a filesystem with a file
42 _scratch_mkfs >>$seqres.full 2>&1
44 echo "frozen" > $testfile
46 # Mount filesystem "noatime" and freeze right after mount -
47 # reads should not block
48 _scratch_cycle_mount "noatime"
49 xfs_freeze -f $SCRATCH_MNT
51 # Read file while filesystem is frozen should succeed
53 $TIMEOUT_PROG -s KILL 1s cat $testfile
55 xfs_freeze -u $SCRATCH_MNT