• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1FSCK_OPT=-yf
2
3TMPFILE=$test_name.tmp
4> $TMPFILE
5
6stat -f $TMPFILE | grep -q "Type: tmpfs"
7if [ $? = 0 ]; then
8	rm -f $TMPFILE
9	echo "$test_name: $test_description: skipped for tmpfs (no O_DIRECT)"
10	return 0
11fi
12
13$MKE2FS -q -F -o Linux -b 4096 -O mmp $TMPFILE 100 > $test_name.log 2>&1
14status=$?
15if [ "$status" != 0 ] ; then
16	echo "mke2fs -O mmp failed" > $test_name.failed
17	echo "$test_name: $test_description: failed"
18	return $status
19fi
20
21$TUNE2FS -O ^mmp $TMPFILE > $test_name.log 2>&1
22status=$?
23if [ "$status" != 0 ] ; then
24	echo "tune2fs -O ^mmp failed" > $test_name.failed
25	echo "$test_name: $test_description: failed"
26	return $status
27fi
28
29$FSCK $FSCK_OPT $TMPFILE > $test_name.log 2>&1
30status=$?
31if [ "$status" = 0 ] ; then
32	echo "$test_name: $test_description: ok"
33	touch $test_name.ok
34else
35	echo "e2fsck after MMP disable failed" > $test_name.failed
36	echo "$test_name: $test_description: failed"
37	return $status
38fi
39rm -f $TMPFILE
40