Whamcloud - gitweb
merge b_devel into HEAD (20030626 merge tag) for 0.7.1
[fs/lustre-release.git] / lustre / tests / recovery-small.sh
index 42a1e18..0707f1b 100755 (executable)
@@ -31,7 +31,7 @@ MDSSIZE=${MDSSIZE:-100000}
 OSTSIZE=${OSTSIZE:-100000}
 UPCALL=${UPCALL:-$RPWD/recovery-small-upcall.sh}
 FSTYPE=${FSTYPE:-ext3}
-
+TIMEOUT=${TIMEOUT:-5}
 do_mds() {
     $PDSH $MDSNODE "PATH=\$PATH:$RLUSTRE/utils:$RLUSTRE/tests; cd $RPWD; $@" || exit $?
 }
@@ -58,6 +58,13 @@ drop_reply() {
     do_mds "echo 0 > /proc/sys/lustre/fail_loc"
 }
 
+pause_bulk() {
+#define OBD_FAIL_OST_BRW_PAUSE_BULK      0x214
+    do_ost "echo 0x214 > /proc/sys/lustre/fail_loc"
+    do_client "$1"
+    do_client "sync"
+    do_ost "echo 0 > /proc/sys/lustre/fail_loc"
+}
 make_config() {
     rm -f $CONFIG
     for NODE in $CLIENT $MDSNODE $OSTNODE; do
@@ -98,9 +105,9 @@ unmount_client() {
 
 setup() {
     start_mds ${REFORMAT}
-    start_ost ${REFORMAT}
+    start_ost --timeout=$(($TIMEOUT*2)) ${REFORMAT}
     # XXX we should write our own upcall, when we move this somewhere better.
-    mount_client --timeout=${TIMEOUT:-5} \
+    mount_client --timeout=${TIMEOUT} \
         --lustre_upcall=$UPCALL
 }