Whamcloud - gitweb
b=19577
authorrobert.read <robert.read>
Tue, 2 Jun 2009 17:27:36 +0000 (17:27 +0000)
committerrobert.read <robert.read>
Tue, 2 Jun 2009 17:27:36 +0000 (17:27 +0000)
a=fanyong
i=rread

Diagnostic patch for 19577. Temporarily using "error_exit" to faily quickly.

lustre/tests/sanity-quota.sh

index d98796a..6e80581 100644 (file)
@@ -290,7 +290,12 @@ test_1_sub() {
         chown $TSTUSR.$TSTUSR $TESTFILE
 
         log "    Write ..."
+        stime=`date +%s`
        $RUNAS dd if=/dev/zero of=$TESTFILE bs=$BLK_SZ count=$(($LIMIT/2)) || quota_error u $TSTUSR "(usr) write failure, but expect success"
+        etime=`date +%s`
+        delta=$((etime - stime))
+        rate=$((BLK_SZ * LIMIT / 2 / delta / 1024))
+        [ $rate -gt 1024 ] || error_exit "SLOW IO for $TSTUSR (user): $rate KB/sec"
         log "    Done"
         log "    Write out of block quota ..."
        # this time maybe cache write,  ignore it's failure
@@ -321,7 +326,12 @@ test_1_sub() {
         chown $TSTUSR.$TSTUSR $TESTFILE
 
         log "    Write ..."
+        stime=`date +%s`
        $RUNAS dd if=/dev/zero of=$TESTFILE bs=$BLK_SZ count=$(($LIMIT/2)) || quota_error g $TSTUSR "(grp) write failure, but expect success"
+        etime=`date +%s`
+        delta=$((etime - stime))
+        rate=$((BLK_SZ * LIMIT / 2 / delta / 1024))
+        [ $rate -gt 1024 ] || error_exit "SLOW IO for $TSTUSR (group): $rate KB/sec"
         log "    Done"
         log "    Write out of block quota ..."
        # this time maybe cache write, ignore it's failure