fsx/fsstress: round blocksize properly
[xfstests-dev.git] / tests / generic / 604
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2020 Facebook  All Rights Reserved.
4 #
5 # FS QA Test 604
6 #
7 # Evicting dirty inodes can take a long time during umount.
8 # Check that a new mount racing with such a delayed umount succeeds.
9 #
10 seq=`basename $0`
11 seqres=$RESULT_DIR/$seq
12 echo "QA output created by $seq"
13
14 here=`pwd`
15 tmp=/tmp/$$
16 status=1        # failure is the default!
17 trap "_cleanup; exit \$status" 0 1 2 3 15
18
19 _cleanup()
20 {
21         cd /
22         rm -f $tmp.*
23 }
24
25 # get standard environment, filters and checks
26 . ./common/rc
27 . ./common/filter
28
29 # remove previous $seqres.full before test
30 rm -f $seqres.full
31
32 # real QA test starts here
33
34 # Modify as appropriate.
35 _supported_fs generic
36 _require_scratch
37
38 _scratch_mkfs > /dev/null 2>&1
39 _scratch_mount
40 for i in $(seq 0 500); do
41         $XFS_IO_PROG -c "pwrite 0 4K" $SCRATCH_MNT/$i >/dev/null 2>&1
42 done
43 _scratch_unmount &
44 _scratch_mount
45 wait
46
47 echo "Silence is golden"
48
49 # success, all done
50 status=0
51 exit