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 _begin_fstest auto quick freeze mount
15 # Import common functions.
18 # real QA test starts here
22 _require_command "$TIMEOUT_PROG" "timeout"
24 testfile=$SCRATCH_MNT/foo
26 # Create a filesystem with a file
27 _scratch_mkfs >>$seqres.full 2>&1
29 echo "frozen" > $testfile
31 # Mount filesystem "noatime" and freeze right after mount -
32 # reads should not block
33 _scratch_cycle_mount "noatime"
34 xfs_freeze -f $SCRATCH_MNT
36 # Read file while filesystem is frozen should succeed
38 $TIMEOUT_PROG -s KILL 1s cat $testfile
40 xfs_freeze -u $SCRATCH_MNT