7 # This test needs to be run on the client
10 LUSTRE=${LUSTRE:-`dirname $0`/..}
11 . $LUSTRE/tests/test-framework.sh
13 . ${CONFIG:=$LUSTRE/tests/cfg/local.sh}
17 # bug number: 2766 4176
18 ALWAYS_EXCEPT="0b 39 $REPLAY_SINGLE_EXCEPT"
20 # failed in our b_new_cmd, please update this.
21 ALWAYS_EXCEPT=" 5 11 20b 25 30 31 52 58 $ALWAYS_EXCEPT"
26 SETUP=${SETUP:-"setup"}
27 CLEANUP=${CLEANUP:-"stopall"}
29 if [ "$ONLY" == "cleanup" ]; then
30 sysctl -w lnet.debug=0 || true
42 if [ "$ONLY" == "setup" ]; then
52 run_test 0 "empty replay"
55 # this test attempts to trigger a race in the precreation code,
56 # and must run before any other objects are created on the filesystem
58 createmany -o $DIR/$tfile 20 || return 1
59 unlinkmany $DIR/$tfile 20 || return 2
61 run_test 0b "ensure object created after recover exists. (3284)"
65 local fn=`ls /proc/fs/lustre/seq-cli-srv*/seq_width`
71 local fn=`ls /proc/fs/lustre/seq-cli-srv*/seq_width`
80 # make seq manager switch to next sequence each
81 # time as new fid is needed.
82 seq_width=`seq_get_width`
85 # make sure that fld has created atleast one new
87 touch $DIR/$tfile || return 1
88 seq_set_width $seq_width
90 # fail mds and start recovery, replay RPCs, etc.
93 # wait for recovery finish
97 # flush fld cache and dentry cache to make it lookup
98 # created entry instead of revalidating existent one
100 zconf_mount `hostname` $MOUNT
102 # issue lookup which should call fld lookup which
103 # should fail if client did not replay fld create
104 # correctly and server has no fld entry
105 touch $DIR/$tfile || return 2
106 rm $DIR/$tfile || return 2
108 run_test 0c "fld create"
114 $CHECKSTAT -t file $DIR/$tfile || return 1
117 run_test 1 "simple create"
123 $CHECKSTAT -t file $DIR/$tfile || return 1
129 ./mcreate $DIR/$tfile
133 $CHECKSTAT -t file $DIR/$tfile || return 1
141 o_directory $DIR/$tfile
143 $CHECKSTAT -t file $DIR/$tfile || return 2
146 run_test 3a "replay failed open(O_DIRECTORY)"
150 #define OBD_FAIL_MDS_OPEN_PACK | OBD_FAIL_ONCE
151 do_facet mds "sysctl -w lustre.fail_loc=0x80000114"
153 do_facet mds "sysctl -w lustre.fail_loc=0"
155 $CHECKSTAT -t file $DIR/$tfile && return 2
158 run_test 3b "replay failed open -ENOMEM"
162 #define OBD_FAIL_MDS_ALLOC_OBDO | OBD_FAIL_ONCE
163 do_facet mds "sysctl -w lustre.fail_loc=0x80000128"
165 do_facet mds "sysctl -w lustre.fail_loc=0"
168 $CHECKSTAT -t file $DIR/$tfile && return 2
171 run_test 3c "replay failed open -ENOMEM"
175 for i in `seq 10`; do
176 echo "tag-$i" > $DIR/$tfile-$i
179 for i in `seq 10`; do
180 grep -q "tag-$i" $DIR/$tfile-$i || error "$tfile-$i"
183 run_test 4 "|x| 10 open(O_CREAT)s"
189 $CHECKSTAT -t file $DIR/$tfile-* && return 1 || true
191 run_test 4b "|x| rm 10 files"
193 # The idea is to get past the first block of precreated files on both
194 # osts, and then replay.
197 for i in `seq 220`; do
198 echo "tag-$i" > $DIR/$tfile-$i
201 for i in `seq 220`; do
202 grep -q "tag-$i" $DIR/$tfile-$i || error "f1c-$i"
206 # waiting for commitment of removal
208 run_test 5 "|x| 220 open(O_CREAT)"
214 mcreate $DIR/$tdir/$tfile
216 $CHECKSTAT -t dir $DIR/$tdir || return 1
217 $CHECKSTAT -t file $DIR/$tdir/$tfile || return 2
219 # waiting for log process thread
221 run_test 6 "mkdir + contained create"
227 $CHECKSTAT -t dir $DIR/$tdir && return 1 || true
229 run_test 6b "|X| rmdir"
234 mcreate $DIR/$tdir/$tfile
236 $CHECKSTAT -t dir $DIR/$tdir || return 1
237 $CHECKSTAT -t file $DIR/$tdir/$tfile || return 2
240 run_test 7 "mkdir |X| contained create"
244 multiop $DIR/$tfile mo_c &
249 $CHECKSTAT -t file $DIR/$tfile || return 1
250 kill -USR1 $MULTIPID || return 2
251 wait $MULTIPID || return 3
254 run_test 8 "creat open |X| close"
259 local old_inum=`ls -i $DIR/$tfile | awk '{print $1}'`
261 local new_inum=`ls -i $DIR/$tfile | awk '{print $1}'`
263 echo " old_inum == $old_inum, new_inum == $new_inum"
264 if [ $old_inum -eq $new_inum ] ;
266 echo " old_inum and new_inum match"
268 echo "!!!! old_inum and new_inum NOT match"
273 run_test 9 "|X| create (same inum/gen)"
278 mv $DIR/$tfile $DIR/$tfile-2
281 $CHECKSTAT $DIR/$tfile && return 1
282 $CHECKSTAT $DIR/$tfile-2 ||return 2
286 run_test 10 "create |X| rename unlink"
290 echo "old" > $DIR/$tfile
291 mv $DIR/$tfile $DIR/$tfile-2
293 echo "new" > $DIR/$tfile
295 grep old $DIR/$tfile-2
297 grep new $DIR/$tfile || return 1
298 grep old $DIR/$tfile-2 || return 2
300 run_test 11 "create open write rename |X| create-old-name read"
304 multiop $DIR/$tfile o_tSc &
306 # give multiop a chance to open
311 wait $pid || return 1
314 [ -e $DIR/$tfile ] && return 2
317 run_test 12 "open, unlink |X| close"
320 # 1777 - replay open after committed chmod that would make
321 # a regular open a failure
324 multiop $DIR/$tfile O_wc &
326 # give multiop a chance to open
329 $CHECKSTAT -p 0 $DIR/$tfile
333 wait $pid || return 1
335 $CHECKSTAT -s 1 -p 0 $DIR/$tfile || return 2
338 run_test 13 "open chmod 0 |x| write close"
341 multiop $DIR/$tfile O_tSc &
343 # give multiop a chance to open
347 kill -USR1 $pid || return 1
348 wait $pid || return 2
351 [ -e $DIR/$tfile ] && return 3
354 run_test 14 "open(O_CREAT), unlink |X| close"
357 multiop $DIR/$tfile O_tSc &
359 # give multiop a chance to open
363 touch $DIR/g11 || return 1
365 wait $pid || return 2
368 [ -e $DIR/$tfile ] && return 3
369 touch $DIR/h11 || return 4
372 run_test 15 "open(O_CREAT), unlink |X| touch new, close"
379 mcreate $DIR/$tfile-2
381 [ -e $DIR/$tfile ] && return 1
382 [ -e $DIR/$tfile-2 ] || return 2
383 munlink $DIR/$tfile-2 || return 3
385 run_test 16 "|X| open(O_CREAT), unlink, touch new, unlink new"
389 multiop $DIR/$tfile O_c &
391 # give multiop a chance to open
394 kill -USR1 $pid || return 1
395 wait $pid || return 2
396 $CHECKSTAT -t file $DIR/$tfile || return 3
399 run_test 17 "|X| open(O_CREAT), |replay| close"
403 multiop $DIR/$tfile O_tSc &
405 # give multiop a chance to open
408 touch $DIR/$tfile-2 || return 1
409 echo "pid: $pid will close"
411 wait $pid || return 2
414 [ -e $DIR/$tfile ] && return 3
415 [ -e $DIR/$tfile-2 ] || return 4
416 # this touch frequently fails
417 touch $DIR/$tfile-3 || return 5
418 munlink $DIR/$tfile-2 || return 6
419 munlink $DIR/$tfile-3 || return 7
422 run_test 18 "|X| open(O_CREAT), unlink, touch new, close, touch, unlink"
424 # bug 1855 (a simpler form of test_11 above)
428 echo "old" > $DIR/$tfile
429 mv $DIR/$tfile $DIR/$tfile-2
430 grep old $DIR/$tfile-2
432 grep old $DIR/$tfile-2 || return 2
434 run_test 19 "|X| mcreate, open, write, rename "
438 multiop $DIR/$tfile O_tSc &
440 # give multiop a chance to open
446 wait $pid || return 1
447 [ -e $DIR/$tfile ] && return 2
450 run_test 20 "|X| open(O_CREAT), unlink, replay, close (test mds_cleanup_orphans)"
453 BEFORESPACE=`df -P $DIR | tail -1 | awk '{ print $4 }'`
454 dd if=/dev/zero of=$DIR/$tfile bs=4k count=10000 &
456 usleep 60 # give dd a chance to start
457 lfs getstripe $DIR/$tfile || return 1
458 rm -f $DIR/$tfile || return 2 # make it an orphan
460 df -P $DIR || df -P $DIR || true # reconnect
462 fail mds # start orphan recovery
463 df -P $DIR || df -P $DIR || true # reconnect
465 AFTERSPACE=`df -P $DIR | tail -1 | awk '{ print $4 }'`
466 [ $AFTERSPACE -lt $((BEFORESPACE - 20)) ] && \
467 error "after $AFTERSPACE < before $BEFORESPACE" && return 5
470 run_test 20b "write, unlink, eviction, replay, (test mds_cleanup_orphans)"
474 multiop $DIR/$tfile O_tSc &
476 # give multiop a chance to open
479 touch $DIR/g11 || return 1
483 wait $pid || return 2
484 [ -e $DIR/$tfile ] && return 3
485 touch $DIR/h11 || return 4
488 run_test 21 "|X| open(O_CREAT), unlink touch new, replay, close (test mds_cleanup_orphans)"
491 multiop $DIR/$tfile O_tSc &
493 # give multiop a chance to open
501 wait $pid || return 1
502 [ -e $DIR/$tfile ] && return 2
505 run_test 22 "open(O_CREAT), |X| unlink, replay, close (test mds_cleanup_orphans)"
508 multiop $DIR/$tfile O_tSc &
510 # give multiop a chance to open
515 touch $DIR/g11 || return 1
519 wait $pid || return 2
520 [ -e $DIR/$tfile ] && return 3
521 touch $DIR/h11 || return 4
524 run_test 23 "open(O_CREAT), |X| unlink touch new, replay, close (test mds_cleanup_orphans)"
527 multiop $DIR/$tfile O_tSc &
529 # give multiop a chance to open
536 wait $pid || return 1
537 [ -e $DIR/$tfile ] && return 2
540 run_test 24 "open(O_CREAT), replay, unlink, close (test mds_cleanup_orphans)"
543 multiop $DIR/$tfile O_tSc &
545 # give multiop a chance to open
552 wait $pid || return 1
553 [ -e $DIR/$tfile ] && return 2
556 run_test 25 "open(O_CREAT), unlink, replay, close (test mds_cleanup_orphans)"
560 multiop $DIR/$tfile-1 O_tSc &
562 multiop $DIR/$tfile-2 O_tSc &
564 # give multiop a chance to open
569 wait $pid2 || return 1
573 wait $pid1 || return 2
574 [ -e $DIR/$tfile-1 ] && return 3
575 [ -e $DIR/$tfile-2 ] && return 4
578 run_test 26 "|X| open(O_CREAT), unlink two, close one, replay, close one (test mds_cleanup_orphans)"
582 multiop $DIR/$tfile-1 O_tSc &
584 multiop $DIR/$tfile-2 O_tSc &
586 # give multiop a chance to open
593 wait $pid1 || return 1
595 wait $pid2 || return 2
596 [ -e $DIR/$tfile-1 ] && return 3
597 [ -e $DIR/$tfile-2 ] && return 4
600 run_test 27 "|X| open(O_CREAT), unlink two, replay, close two (test mds_cleanup_orphans)"
603 multiop $DIR/$tfile-1 O_tSc &
605 multiop $DIR/$tfile-2 O_tSc &
607 # give multiop a chance to open
613 wait $pid2 || return 1
617 wait $pid1 || return 2
618 [ -e $DIR/$tfile-1 ] && return 3
619 [ -e $DIR/$tfile-2 ] && return 4
622 run_test 28 "open(O_CREAT), |X| unlink two, close one, replay, close one (test mds_cleanup_orphans)"
625 multiop $DIR/$tfile-1 O_tSc &
627 multiop $DIR/$tfile-2 O_tSc &
629 # give multiop a chance to open
637 wait $pid1 || return 1
639 wait $pid2 || return 2
640 [ -e $DIR/$tfile-1 ] && return 3
641 [ -e $DIR/$tfile-2 ] && return 4
644 run_test 29 "open(O_CREAT), |X| unlink two, replay, close two (test mds_cleanup_orphans)"
647 multiop $DIR/$tfile-1 O_tSc &
649 multiop $DIR/$tfile-2 O_tSc &
651 # give multiop a chance to open
659 wait $pid1 || return 1
661 wait $pid2 || return 2
662 [ -e $DIR/$tfile-1 ] && return 3
663 [ -e $DIR/$tfile-2 ] && return 4
666 run_test 30 "open(O_CREAT) two, unlink two, replay, close two (test mds_cleanup_orphans)"
669 multiop $DIR/$tfile-1 O_tSc &
671 multiop $DIR/$tfile-2 O_tSc &
673 # give multiop a chance to open
681 wait $pid1 || return 1
683 wait $pid2 || return 2
684 [ -e $DIR/$tfile-1 ] && return 3
685 [ -e $DIR/$tfile-2 ] && return 4
688 run_test 31 "open(O_CREAT) two, unlink one, |X| unlink one, close two (test mds_cleanup_orphans)"
690 # tests for bug 2104; completion without crashing is success. The close is
691 # stale, but we always return 0 for close, so the app never sees it.
693 multiop $DIR/$tfile O_c &
695 multiop $DIR/$tfile O_c &
697 # give multiop a chance to open
700 df $MOUNT || sleep 1 && df $MOUNT || return 1
706 run_test 32 "close() notices client eviction; close() after client eviction"
708 # Abort recovery before client complete
713 # this file should be gone, because the replay was aborted
714 $CHECKSTAT -t file $DIR/$tfile && return 3
717 run_test 33 "abort recovery before client does replay"
720 multiop $DIR/$tfile O_c &
722 # give multiop a chance to open
729 [ -e $DIR/$tfile ] && return 1
733 run_test 34 "abort recovery before client does replay (test mds_cleanup_orphans)"
735 # bug 2278 - generate one orphan on OST, then destroy it during recovery from llog
739 #define OBD_FAIL_MDS_REINT_NET_REP 0x119
740 do_facet mds "sysctl -w lustre.fail_loc=0x80000119"
745 # give a chance to remove from MDS
747 $CHECKSTAT -t file $DIR/$tfile && return 1 || true
749 run_test 35 "test recovery from llog for unlink op"
751 # b=2432 resent cancel after replay uses wrong cookie,
752 # so don't resend cancels
756 checkstat $DIR/$tfile
759 if dmesg | grep "unknown lock cookie"; then
760 echo "cancel after replay failed"
764 run_test 36 "don't resend cancel"
767 # directory orphans can't be unlinked from PENDING directory
769 rmdir $DIR/$tfile 2>/dev/null
770 multiop $DIR/$tfile dD_c &
772 # give multiop a chance to open
777 # clear the dmesg buffer so we only see errors from this recovery
781 dmesg | grep "mds_unlink_orphan.*error .* unlinking orphan" && return 1
785 run_test 37 "abort recovery before client does replay (test mds_cleanup_orphans for directories)"
788 createmany -o $DIR/$tfile-%d 800
789 unlinkmany $DIR/$tfile-%d 0 400
792 unlinkmany $DIR/$tfile-%d 400 400
794 $CHECKSTAT -t file $DIR/$tfile-* && return 1 || true
796 run_test 38 "test recovery from unlink llog (test llog_gen_rec) "
798 test_39() { # bug 4176
799 createmany -o $DIR/$tfile-%d 800
801 unlinkmany $DIR/$tfile-%d 0 400
803 unlinkmany $DIR/$tfile-%d 400 400
805 $CHECKSTAT -t file $DIR/$tfile-* && return 1 || true
807 run_test 39 "test recovery from unlink llog (test llog_gen_rec) "
810 awk -vwrites=0 '/ost_write/ { writes += $2 } END { print writes; }' $LPROC/osc/*/stats
815 $LCTL mark multiop $MOUNT/$tfile OS_c
816 multiop $MOUNT/$tfile OS_c &
818 writeme -s $MOUNT/${tfile}-2 &
822 #define OBD_FAIL_MDS_CONNECT_NET 0x117
823 do_facet mds "sysctl -w lustre.fail_loc=0x80000117"
825 stat1=`count_ost_writes`
827 stat2=`count_ost_writes`
828 echo "$stat1, $stat2"
829 if [ $stat1 -lt $stat2 ]; then
830 echo "writes continuing during recovery"
833 echo "writes not continuing during recovery, bug 2477"
836 echo "waiting for writeme $WRITE_PID"
840 echo "waiting for multiop $PID"
841 wait $PID || return 2
842 do_facet client munlink $MOUNT/$tfile || return 3
843 do_facet client munlink $MOUNT/${tfile}-2 || return 3
846 run_test 40 "cause recovery in ptlrpc, ensure IO continues"
850 # make sure that a read to one osc doesn't try to double-unlock its page just
851 # because another osc is invalid. trigger_group_io used to mistakenly return
852 # an error if any oscs were invalid even after having successfully put rpcs
853 # on valid oscs. This was fatal if the caller was ll_readpage who unlocked
854 # the page, guarnateeing that the unlock from the RPC completion would
855 # assert on trying to unlock the unlocked page.
857 local f=$MOUNT/$tfile
858 # make sure the start of the file is ost1
859 lfs setstripe $f $((128 * 1024)) 0 0
860 do_facet client dd if=/dev/zero of=$f bs=4k count=1 || return 3
862 # fail ost2 and read from ost1
863 local osc2dev=`grep ${ost2_svc}lustre-clilov-osc- $LPROC/devices | awk '{print $1}'`
864 [ "$osc2dev" ] || return 4
865 $LCTL --device $osc2dev deactivate || return 1
866 do_facet client dd if=$f of=/dev/null bs=4k count=1 || return 3
867 $LCTL --device $osc2dev activate || return 2
870 run_test 41 "read from a valid osc while other oscs are invalid"
872 # test MDS recovery after ost failure
874 blocks=`df -P $MOUNT | tail -n 1 | awk '{ print $2 }'`
875 createmany -o $DIR/$tfile-%d 800
877 unlinkmany $DIR/$tfile-%d 0 400
878 DEBUG42=`sysctl -n lnet.debug`
879 sysctl -w lnet.debug=-1
882 # osc is evicted, fs is smaller (but only with failout OSTs (bug 7287)
883 #blocks_after=`df -P $MOUNT | tail -n 1 | awk '{ print $2 }'`
884 #[ $blocks_after -lt $blocks ] || return 1
885 echo wait for MDS to timeout and recover
886 sleep $((TIMEOUT * 2))
887 sysctl -w lnet.debug=$DEBUG42
888 unlinkmany $DIR/$tfile-%d 400 400
889 $CHECKSTAT -t file $DIR/$tfile-* && return 2 || true
891 run_test 42 "recovery after ost failure"
893 # timeout in MDS/OST recovery RPC will LBUG MDS
894 test_43() { # bug 2530
897 # OBD_FAIL_OST_CREATE_NET 0x204
898 do_facet ost1 "sysctl -w lustre.fail_loc=0x80000204"
901 do_facet ost1 "sysctl -w lustre.fail_loc=0"
905 run_test 43 "mds osc import failure during recovery; don't LBUG"
908 mdcdev=`awk '/-mdc-/ {print $1}' $LPROC/devices`
909 [ "$mdcdev" ] || exit 2
910 for i in `seq 1 10`; do
911 #define OBD_FAIL_TGT_CONN_RACE 0x701
912 do_facet mds "sysctl -w lustre.fail_loc=0x80000701"
913 $LCTL --device $mdcdev recover
916 do_facet mds "sysctl -w lustre.fail_loc=0"
919 run_test 44 "race in target handle connect"
922 mdcdev=`awk '/-mdc-/ {print $1}' $LPROC/devices`
923 [ "$mdcdev" ] || exit 2
924 for i in `seq 1 10`; do
925 #define OBD_FAIL_TGT_DELAY_RECONNECT 0x704
926 do_facet mds "sysctl -w lustre.fail_loc=0x80000704"
927 $LCTL --device $mdcdev recover
930 do_facet mds "sysctl -w lustre.fail_loc=0"
933 run_test 44b "race in target handle connect"
935 # Handle failed close
937 mdcdev=`awk '/-mdc-/ {print $1}' $LPROC/devices`
938 [ "$mdcdev" ] || exit 2
939 $LCTL --device $mdcdev recover
941 multiop $DIR/$tfile O_c &
945 # This will cause the CLOSE to fail before even
946 # allocating a reply buffer
947 $LCTL --device $mdcdev deactivate || return 4
951 wait $pid || return 1
953 $LCTL --device $mdcdev activate || return 5
956 $CHECKSTAT -t file $DIR/$tfile || return 2
959 run_test 45 "Handle failed close"
963 drop_reply "touch $DIR/$tfile"
965 # ironically, the previous test, 45, will cause a real forced close,
966 # so just look for one for this test
967 dmesg | grep -i "force closing client file handle for $tfile" && return 1
970 run_test 46 "Don't leak file handle after open resend (3325)"
972 test_47() { # bug 2824
973 # create some files to make sure precreate has been done on all
974 # OSTs. (just in case this test is run independently)
975 createmany -o $DIR/$tfile 20 || return 1
977 # OBD_FAIL_OST_CREATE_NET 0x204
979 do_facet ost1 "sysctl -w lustre.fail_loc=0x80000204"
980 df $MOUNT || return 2
982 # let the MDS discover the OST failure, attempt to recover, fail
984 sleep $((3 * TIMEOUT))
986 # Without 2824, this createmany would hang
987 createmany -o $DIR/$tfile 20 || return 3
988 unlinkmany $DIR/$tfile 20 || return 4
990 do_facet ost1 "sysctl -w lustre.fail_loc=0"
993 run_test 47 "MDS->OSC failure during precreate cleanup (2824)"
997 createmany -o $DIR/$tfile 20 || return 1
998 # OBD_FAIL_OST_EROFS 0x216
1000 do_facet ost1 "sysctl -w lustre.fail_loc=0x80000216"
1001 df $MOUNT || return 2
1003 createmany -o $DIR/$tfile 20 20 || return 2
1004 unlinkmany $DIR/$tfile 40 || return 3
1006 do_facet ost1 "sysctl -w lustre.fail_loc=0"
1009 run_test 48 "MDS->OSC failure during precreate cleanup (2824)"
1012 local oscdev=`grep ${ost1_svc}lustre-clilov-osc- $LPROC/devices | awk '{print $1}'`
1013 [ "$oscdev" ] || return 1
1014 $LCTL --device $oscdev recover && $LCTL --device $oscdev recover
1015 # give the mds_lov_sync threads a chance to run
1018 run_test 50 "Double OSC recovery, don't LASSERT (3812)"
1020 # b3764 timed out lock replay
1023 cancel_lru_locks mdc
1025 multiop $DIR/$tfile s
1027 do_facet mds "sysctl -w lustre.fail_loc=0x8000030c"
1029 do_facet mds "sysctl -w lustre.fail_loc=0x0"
1031 $CHECKSTAT -t file $DIR/$tfile-* && return 3 || true
1033 run_test 52 "time out lock replay (3764)"
1035 #b_cray 53 "|X| open request and close reply while two MDC requests in flight"
1036 #b_cray 54 "|X| open request and close reply while two MDC requests in flight"
1038 #b3761 ASSERTION(hash != 0) failed
1040 # OBD_FAIL_MDS_OPEN_CREATE | OBD_FAIL_ONCE
1041 do_facet mds "sysctl -w lustre.fail_loc=0x8000012b"
1043 # give touch a chance to run
1045 do_facet mds "sysctl -w lustre.fail_loc=0x0"
1049 run_test 55 "let MDS_CHECK_RESENT return the original return code instead of 0"
1051 #b3440 ASSERTION(rec->ur_fid2->id) failed
1053 ln -s foo $DIR/$tfile
1055 #drop_reply "cat $DIR/$tfile"
1059 run_test 56 "don't replay a symlink open request (3440)"
1061 #recovery one mds-ost setattr from llog
1063 #define OBD_FAIL_MDS_OST_SETATTR 0x12c
1064 do_facet mds "sysctl -w lustre.fail_loc=0x8000012c"
1069 $CHECKSTAT -t file $DIR/$tfile || return 1
1070 do_facet mds "sysctl -w lustre.fail_loc=0x0"
1073 run_test 57 "test recovery from llog for setattr op"
1075 #recovery many mds-ost setattr from llog
1077 #define OBD_FAIL_MDS_OST_SETATTR 0x12c
1078 do_facet mds "sysctl -w lustre.fail_loc=0x8000012c"
1080 createmany -o $DIR/$tdir/$tfile-%d 2500
1084 $CHECKSTAT -t file $DIR/$tdir/$tfile-* || return 1
1085 do_facet mds "sysctl -w lustre.fail_loc=0x0"
1086 unlinkmany $DIR/$tdir/$tfile-%d 2500
1089 run_test 58 "test recovery from llog for setattr op (test llog_gen_rec)"
1091 equals_msg test complete, cleaning up