14 new_fs ext2 /tmp/ost 10000
17 new_fs ${MDSFS} /tmp/mds 10000
20 echo 0xffffffff > /proc/sys/portals/debug
38 MOUNT='mount -t lustre_light -o device=3 none /mnt/obd'
42 echo $1 > /proc/sys/lustre/fail_loc
47 echo "Cleaning up and restarting MDS"
56 echo 0 > /proc/sys/lustre/fail_loc
70 chmod a+x /mnt/obd/foo
73 # OBD_FAIL_MDS_REINT_SETATTR_WRITE - MDS will discard data from setattr
74 test_fail 0x10a chmod 000 /mnt/obd/foo
76 [ ! -x /mnt/obd/foo ] && echo "/mnt/obd/foo is not executable!" 1>&2 && exit -1
78 # OBD_FAIL_MDS_REINT_CREATE_WRITE - MDS will not create the file
79 test_fail 0x10c touch /mnt/obd/bar
81 [ $? -eq 0 ] && echo "/mnt/obd/bar was created!" 1>&2 && exit -1
83 # OBD_FAIL_MDS_REINT_UNLINK_WRITE - MDS will discard data from unlink
84 test_fail 0x10e rm /mnt/obd/foo
86 [ $? -eq 1 ] && echo "/mnt/obd/foo has been removed!" 1>&2 && exit -1
88 # OBD_FAIL_MDS_REINT_RENAME_WRITE - MDS will discard data from rename
89 test_fail 0x112 mv /mnt/obd/foo /mnt/obd/bar
90 ls /mnt/obd/foo /mnt/obd/bar
91 [ ! -f /mnt/obd/foo -o -f /mnt/obd/bar ] && \
92 echo "/mnt/obd/foo has been renamed to bar!" 1>&2 && exit -1