11 echo $1 > /proc/sys/lustre/fail_loc
16 echo "Cleaning up and restarting MDS"
17 umount /mnt/lustre || fail "unable to unmount"
25 echo 0 > /proc/sys/lustre/fail_loc
39 chmod a+x /mnt/lustre/foo
42 # OBD_FAIL_MDS_REINT_SETATTR_WRITE - MDS will discard data from setattr
43 test_fail 0x10a chmod 000 /mnt/lustre/foo
45 [ ! -x /mnt/lustre/foo ] && fail "/mnt/lustre/foo is not executable!"
47 # OBD_FAIL_MDS_REINT_CREATE_WRITE - MDS will not create the file
48 test_fail 0x10c touch /mnt/lustre/bar
50 [ $? -eq 0 ] && fail "/mnt/lustre/bar was created!"
52 # OBD_FAIL_MDS_REINT_UNLINK_WRITE - MDS will discard data from unlink
53 test_fail 0x10e rm /mnt/lustre/foo
55 [ $? -eq 1 ] && fail "/mnt/lustre/foo has been removed!"
57 # OBD_FAIL_MDS_REINT_RENAME_WRITE - MDS will discard data from rename
58 test_fail 0x112 mv /mnt/lustre/foo /mnt/lustre/bar
59 ls /mnt/lustre/foo /mnt/lustre/bar
60 [ ! -f /mnt/lustre/foo -o -f /mnt/lustre/bar ] && \
61 fail "/mnt/lustre/foo has been renamed to bar!"