1FSCK_OPT=-yf 2 3if [ "$QUOTA" != "y" ]; then 4 echo "$test_name: $test_description: skipped" 5 return 0 6fi 7 8$MKE2FS -q -F -o Linux -I 256 -b 4096 $TMPFILE 10000 > $test_name.log 2>&1 9status=$? 10if [ "$status" != 0 ] ; then 11 echo "mke2fs failed" > $test_name.failed 12 echo "$test_name: $test_description: failed" 13 return $status 14fi 15 16dd if=/dev/zero of=$TMPFILE.2 bs=1048576 count=1 >> $test_name.log 2>&1 17cat <<- EOF | $DEBUGFS -w $TMPFILE >> $test_name.log 2>&1 18 write $TMPFILE.2 file1 19 set_inode_field file1 projid 500 20EOF 21rm -f $TMPFILE.2 22 23$TUNE2FS -O project $TMPFILE >> $test_name.log 2>&1 24status=$? 25if [ "$status" != 0 ] ; then 26 echo "tune2fs -O project failed with $status" > $test_name.failed 27 echo "$test_name: $test_description: failed" 28 return $status 29fi 30 31$FSCK $FSCK_OPT $TMPFILE >> $test_name.log 2>&1 32status=$? 33if [ "$status" = 0 ] ; then 34 echo "$test_name: $test_description: ok" 35 touch $test_name.ok 36else 37 echo "e2fsck with project enabled failed with $status" > $test_name.failed 38 echo "$test_name: $test_description: failed" 39 return $status 40fi 41rm -f $TMPFILE 42