blob: 2b37b1e73a4bb69a617df9e6984a5ae4c01b3a42 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
#! /bin/bash
# SPDX-License-Identifier: GPL-2.0
#
# FS QA Test 738
#
# Test possible deadlock of umount and reclaim memory
# when there are EOF blocks in files.
#
. ./common/preamble
_begin_fstest auto quick freeze
_cleanup()
{
xfs_freeze -u $SCRATCH_MNT 2>/dev/null
wait
cd /
rm -r -f $tmp.*
}
_supported_fs generic
_require_scratch
_require_freeze
_scratch_mkfs >> $seqres.full
_scratch_mount
create_eof_block_file()
{
# Create several EOF blocks in the new file
for j in $(seq 1 5); do
cat $SCRATCH_MNT/testfile >> $1
done
}
$XFS_IO_PROG -fc "pwrite 0 64k" $SCRATCH_MNT/testfile >> $seqres.full
# Create enough files to make sure there is enough cache
for i in $(seq 0 1024); do
create_eof_block_file $SCRATCH_MNT/$i
done
sync
xfs_freeze -f $SCRATCH_MNT
# This will hang if bug reproduces
echo 3 > /proc/sys/vm/drop_caches &
# Wait a while before exiting and unfreezing.
sleep 3
# success, all done
echo "Silence is golden"
status=0
exit
|