14 new_fs ext2 /tmp/ost 10000
17 new_fs ${MDSFS} /tmp/mds 10000
20 echo 0xffffffff > /proc/sys/portals/debug
41 MNT="mount -t lustre_lite -o device=`$OBDCTL name2dev OSCDEV` none /mnt/lustre"
45 echo $1 > /proc/sys/lustre/fail_loc
50 echo "Cleaning up and restarting MDS"
51 umount /mnt/lustre || fail "unable to unmount"
59 echo 0 > /proc/sys/lustre/fail_loc
73 chmod a+x /mnt/lustre/foo
76 # OBD_FAIL_MDS_REINT_SETATTR_WRITE - MDS will discard data from setattr
77 test_fail 0x10a chmod 000 /mnt/lustre/foo
79 [ ! -x /mnt/lustre/foo ] && fail "/mnt/lustre/foo is not executable!"
81 # OBD_FAIL_MDS_REINT_CREATE_WRITE - MDS will not create the file
82 test_fail 0x10c touch /mnt/lustre/bar
84 [ $? -eq 0 ] && fail "/mnt/lustre/bar was created!"
86 # OBD_FAIL_MDS_REINT_UNLINK_WRITE - MDS will discard data from unlink
87 test_fail 0x10e rm /mnt/lustre/foo
89 [ $? -eq 1 ] && fail "/mnt/lustre/foo has been removed!"
91 # OBD_FAIL_MDS_REINT_RENAME_WRITE - MDS will discard data from rename
92 test_fail 0x112 mv /mnt/lustre/foo /mnt/lustre/bar
93 ls /mnt/lustre/foo /mnt/lustre/bar
94 [ ! -f /mnt/lustre/foo -o -f /mnt/lustre/bar ] && \
95 fail "/mnt/lustre/foo has been renamed to bar!"