2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2007 Silicon Graphics, Inc. All Rights Reserved.
7 # unwritten extent conversion test
10 _begin_fstest rw metadata auto stress
12 # Override the default cleanup function.
15 $KILLALL_PROG -r -q -TERM fsstress 2> /dev/null
16 wait # ensures all fsstress processes died
23 FSSTRESS_ARGS=`_scale_fsstress_args -d $SCRATCH_MNT -p $procs -n $nops \
25 $FSSTRESS_PROG $FSSTRESS_ARGS >> $seqres.full &
29 # Import common functions.
32 # real QA test starts here
35 _require_command "$KILLALL_PROG" killall
36 _require_xfs_io_command "falloc"
39 _scratch_mkfs_xfs >/dev/null 2>&1
42 # fast devices can consume disk space at a rate of 1GB every 5s via the
43 # background workload. With 50 test loops, at 1 second per loop, that means we
44 # need at least 10GB of disk space to ensure this test will not fail with ENOSPC
46 _require_fs_space $SCRATCH_MNT 10485760
48 TEST_FILE=$SCRATCH_MNT/test_file
49 TEST_PROG=$here/src/unwritten_sync
52 echo "*** test unwritten extent conversion under heavy I/O"
57 $TEST_PROG $LOOPS $TEST_FILE