• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# use current directory instead of /tmp becase tmpfs doesn't support DIO
2rm -f $TMPFILE
3TMPFILE=$(mktemp ./tmp-$test_name.XXXXXX)
4
5stat -f $TMPFILE | grep -q "Type: tmpfs"
6if [ $? = 0 ]; then
7	rm -f $TMPFILE
8	echo "$test_name: $test_description: skipped for tmpfs (no O_DIRECT)"
9	return 0
10fi
11
12$MKE2FS -q -F -o Linux -b 4096 -O mmp -E mmp_update_interval=1 $TMPFILE 100 >> $test_name.log 2>&1
13status=$?
14if [ "$status" != 0 ] ; then
15	echo "mke2fs -O mmp failed" > $test_name.failed
16	echo "$test_name: $test_description: failed"
17	return $status
18fi
19
20if test -x $E2IMAGE_EXE; then
21
22ONE_PASS_ONLY=true
23FSCK_OPT="-n -f"
24IMAGE=$TMPFILE
25SKIP_GUNZIP=true
26PREP_CMD="$E2IMAGE_EXE -r  $TMPFILE $TMPFILE.raw 2>/dev/null; \
27          mv $TMPFILE.raw $TMPFILE"
28
29. $cmd_dir/run_e2fsck
30
31else
32	echo "$test_name: $test_description: skipped"
33fi
34