Whamcloud - gitweb
b=21835 fix mdsrate script.
authorEric Mei <eric.mei@oracle.com>
Thu, 17 Jun 2010 02:14:13 +0000 (20:14 -0600)
committerJohann Lombardi <johann@sun.com>
Thu, 17 Jun 2010 08:46:07 +0000 (10:46 +0200)
r=robert.read

lustre/tests/mdsrate-create-large.sh
lustre/tests/mdsrate-create-small.sh
lustre/tests/mdsrate-lookup-10dirs.sh
lustre/tests/mdsrate-lookup-1dir.sh
lustre/tests/mdsrate-stat-large.sh
lustre/tests/mdsrate-stat-small.sh
lustre/tests/test-framework.sh

index 5201349..614889c 100644 (file)
@@ -32,7 +32,7 @@ log "===== $0 ====== "
 
 check_and_setup_lustre
 
-IFree=$(inodes_available)
+IFree=$(mdsrate_inodes_available)
 if [ $IFree -lt $NUM_FILES ]; then
     NUM_FILES=$IFree
 fi
@@ -81,7 +81,7 @@ else
     fi
 fi
 
-IFree=$(inodes_available)
+IFree=$(mdsrate_inodes_available)
 if [ $IFree -lt $NUM_FILES ]; then
     NUM_FILES=$IFree
 fi
index b5db20f..58f66da 100644 (file)
@@ -40,7 +40,7 @@ log "===== $0 ====== "
 
 check_and_setup_lustre
 
-IFree=$(inodes_available)
+IFree=$(mdsrate_inodes_available)
 if [ $IFree -lt $NUM_FILES ]; then
     NUM_FILES=$IFree
 fi
@@ -94,7 +94,7 @@ else
     fi
 fi
 
-IFree=$(inodes_available)
+IFree=$(mdsrate_inodes_available)
 if [ $IFree -lt $NUM_FILES ]; then
     NUM_FILES=$IFree
 fi
index f132055..4655834 100644 (file)
@@ -40,7 +40,7 @@ check_and_setup_lustre
 mkdir -p $TESTDIR
 chmod 0777 $TESTDIR
 
-IFree=$(inodes_available)
+IFree=$(($(mdsrate_inodes_available) - NUM_DIRS))
 if [ $IFree -lt $((NUM_FILES * NUM_DIRS)) ]; then
     NUM_FILES=$((IFree / NUM_DIRS))
 fi
index 752deb7..b86a8b7 100644 (file)
@@ -38,7 +38,7 @@ check_and_setup_lustre
 mkdir -p $TESTDIR
 chmod 0777 $TESTDIR
 
-IFree=$(inodes_available)
+IFree=$(mdsrate_inodes_available)
 if [ $IFree -lt $NUM_FILES ]; then
     NUM_FILES=$IFree
 fi
index 730eb01..a136dea 100644 (file)
@@ -43,7 +43,7 @@ check_and_setup_lustre
 mkdir -p $TESTDIR
 chmod 0777 $TESTDIR
 
-IFree=$(inodes_available)
+IFree=$(mdsrate_inodes_available)
 if [ $IFree -lt $NUM_FILES ]; then
     NUM_FILES=$IFree
 fi
index 21e3a03..a153254 100644 (file)
@@ -43,7 +43,7 @@ check_and_setup_lustre
 mkdir -p $TESTDIR
 chmod 0777 $TESTDIR
 
-IFree=$(inodes_available)
+IFree=$(mdsrate_inodes_available)
 if [ $IFree -lt $NUM_FILES ]; then
     NUM_FILES=$IFree
 fi
index 0654c53..04b7996 100644 (file)
@@ -2855,6 +2855,10 @@ inodes_available () {
     echo $IFree
 }
 
+mdsrate_inodes_available () {
+    echo $(($(inodes_available) - 1))
+}
+
 # reset llite stat counters
 clear_llite_stats(){
         lctl set_param -n llite.*.stats 0