2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved.
7 # * like 054 but want to create more/different kinds of metadata
8 # and so will use fsstress
9 # * also can interrupt metadata with godown
12 _begin_fstest shutdown log v2log auto quota stress
14 # Import common functions.
21 out=$SCRATCH_MNT/fsstress
23 param="-p 4 -z -f rmdir=10 -f link=10 -f creat=10 -f mkdir=10 \
24 -f rename=30 -f stat=30 -f unlink=30 -f truncate=20"
25 _echofull "calling fsstress $param -m8 -n $count"
26 FSSTRESS_ARGS=`_scale_fsstress_args $param $FSSTRESS_AVOID -m 8 -n $count -d $out`
27 if ! $FSSTRESS_PROG $FSSTRESS_ARGS >>$seqres.full 2>&1
29 _echofull "fsstress failed"
45 # real QA test starts here
49 _require_scratch_shutdown
52 QUOTA_OPTION=`_get_quota_option`
55 _scratch_unmount >/dev/null 2>&1
57 _scratch_mkfs >/dev/null 2>&1
58 _require_metadata_journaling $SCRATCH_DEV
60 _get_log_configs > $tmp.seq.params
63 | while read mkfs mnt restofline
65 if [ "$mkfs" = "#" ]; then
69 echo "--- mkfs=$mkfs, mnt=$mnt ---" >> $seqres.full
70 export MKFS_OPTIONS="-l $mkfs"
71 export MOUNT_OPTIONS="-o $mnt"
75 _scratch_mkfs >>$seqres.full 2>&1
76 if [ $? -ne 0 ] ; then
77 _echofull "mkfs failed: $MKFS_OPTIONS"
83 if ! _try_scratch_mount $QUOTA_OPTION >>$seqres.full 2>&1; then
84 _echofull "mount failed: $MOUNT_OPTIONS"
91 # check before on what FS should look like
92 _echofull "ls -RF SCRATCH_MNT"
93 ls -RF $SCRATCH_MNT >$tmp.ls1
96 _scratch_shutdown -v -f >> $seqres.full
99 _scratch_unmount >>$seqres.full 2>&1 \
100 || _fail "umount failed"
102 _echofull "logprint after going down..."
105 _full "logprint headers"
106 _scratch_xfs_logprint -n >>$seqres.full 2>&1
108 _echofull "mount with replay"
109 _try_scratch_mount $QUOTA_OPTION >>$seqres.full 2>&1 \
110 || _fail "mount failed: $MOUNT_OPTIONS"
112 # check on what FS looks like after log recovery
113 _echofull "ls -RF SCRATCH_MNT"
114 ls -RF $SCRATCH_MNT >$tmp.ls2
116 _echofull "diff ls before and after"
117 diff -us $tmp.ls1 $tmp.ls2 | sed "s#$tmp#TMP#g"
122 _echofull "logprint after mount and replay..."
125 if _check_scratch_fs; then
126 _echofull "filesystem is checked ok"
128 _echofull "filesystem is NOT ok"