Whamcloud - gitweb
Branch b1_5
authornathan <nathan>
Fri, 23 Jun 2006 00:12:12 +0000 (00:12 +0000)
committernathan <nathan>
Fri, 23 Jun 2006 00:12:12 +0000 (00:12 +0000)
b=9858
fix lots of cancel_lru_locks calls

lustre/tests/recovery-small.sh
lustre/tests/sanity.sh
lustre/tests/test-framework.sh

index e893c43..9c70893 100755 (executable)
@@ -339,7 +339,7 @@ test_21a() {
 
        do_facet mds "sysctl -w lustre.fail_loc=0x80000115"
        kill -USR1 $close_pid
-       cancel_lru_locks MDC  # force the close
+       cancel_lru_locks mdc
        wait $close_pid || return 1
        wait $open_pid || return 2
        do_facet mds "sysctl -w lustre.fail_loc=0"
@@ -364,7 +364,7 @@ test_21b() {
        do_facet mds "sysctl -w lustre.fail_loc=0"
 
        kill -USR1 $close_pid
-       cancel_lru_locks MDC  # force the close
+       cancel_lru_locks mdc
        wait $close_pid || return 1
        wait $open_pid || return 3
 
@@ -388,7 +388,7 @@ test_21c() {
 
        do_facet mds "sysctl -w lustre.fail_loc=0x80000115"
        kill -USR1 $close_pid
-       cancel_lru_locks MDC  # force the close
+       cancel_lru_locks mdc
        wait $close_pid || return 1
        wait $open_pid || return 2
 
@@ -413,7 +413,7 @@ test_21d() {
 
        do_facet mds "sysctl -w lustre.fail_loc=0x80000122"
        kill -USR1 $pid
-       cancel_lru_locks MDC  # force the close
+       cancel_lru_locks mdc
        wait $pid || return 1
        do_facet mds "sysctl -w lustre.fail_loc=0"
 
@@ -436,7 +436,7 @@ test_21e() {
        do_facet mds "sysctl -w lustre.fail_loc=0"
 
        kill -USR1 $pid
-       cancel_lru_locks MDC  # force the close
+       cancel_lru_locks mdc
        wait $pid || return 1
 
        sleep $TIMEOUT
@@ -459,7 +459,7 @@ test_21f() {
 
        do_facet mds "sysctl -w lustre.fail_loc=0x80000122"
        kill -USR1 $pid
-       cancel_lru_locks MDC  # force the close
+       cancel_lru_locks mdc
        wait $pid || return 1
        do_facet mds "sysctl -w lustre.fail_loc=0"
 
@@ -482,7 +482,7 @@ test_21g() {
 
        do_facet mds "sysctl -w lustre.fail_loc=0x80000115"
        kill -USR1 $pid
-       cancel_lru_locks MDC  # force the close
+       cancel_lru_locks mdc
        wait $pid || return 1
        do_facet mds "sysctl -w lustre.fail_loc=0"
 
@@ -505,7 +505,7 @@ test_21h() {
        do_facet mds "sysctl -w lustre.fail_loc=0"
 
        do_facet mds "sysctl -w lustre.fail_loc=0x80000122"
-       cancel_lru_locks MDC  # force the close
+       cancel_lru_locks mdc
        kill -USR1 $pid
        wait $pid || return 1
        do_facet mds "sysctl -w lustre.fail_loc=0"
@@ -530,7 +530,7 @@ test_22() {
     sleep 1
     multiop $f1 msu || return 1
 
-     cancel_lru_locks MDC  # force the close
+    cancel_lru_locks mdc
     do_facet mds "sysctl -w lustre.fail_loc=0"
 
     wait $close_pid || return 2
index 1833169..4887f1d 100644 (file)
@@ -1107,13 +1107,6 @@ test_28() {
 }
 run_test 28 "create/mknod/mkdir with bad file types ============"
 
-cancel_lru_locks() {
-       for d in $LPROC/ldlm/namespaces/*-$1-*; do
-               echo clear > $d/lru_size
-       done
-       grep "[0-9]" $LPROC/ldlm/namespaces/*-$1-*/lock_unused_count /dev/null
-}
-
 test_29() {
        cancel_lru_locks mdc
        mkdir $DIR/d29
@@ -1579,7 +1572,7 @@ test_36f() {
        sleep 1
        touch --date="$DATESTR" $DIR/d36/$tfile # setattr with timestamp in past
        LS_BEFORE="`ls -l $DIR/d36/$tfile`" # "old" timestamp from client cache
-       cancel_lru_locks OSC
+       cancel_lru_locks osc
        LS_AFTER="`ls -l $DIR/d36/$tfile`"  # timestamp from OST object
        date; date +%s
        [ "$LS_BEFORE" != "$LS_AFTER" ] && \
index 057e4d2..9e272e5 100644 (file)
@@ -678,12 +678,12 @@ clear_failloc() {
 
 cancel_lru_locks() {
     $LCTL mark "cancel_lru_locks start"
-    for d in /proc/fs/lustre/ldlm/namespaces/*-$1-*; do
+    for d in $LPROC/ldlm/namespaces/*-$1-*; do
         if [ -f $d/lru_size ]; then
-            echo clear >> $d/lru_size
-            grep "[0-9]" $d/lock_unused_count
-        fi
+           echo clear >> $d/lru_size
+       fi
     done
+    grep "[0-9]" $LPROC/ldlm/namespaces/*-$1-*/lock_unused_count /dev/null
     $LCTL mark "cancel_lru_locks stop"
 }