Whamcloud - gitweb
LU-3221 lov: remove set_fs() call from lov_getstripe()
[fs/lustre-release.git] / lustre-iokit / mds-survey / mds-survey
index e4d20c3..ffa062e 100755 (executable)
@@ -1,5 +1,6 @@
 #!/bin/bash
-# vim:expandtab:shiftwidth=4:softtabstop=4:tabstop=4:
+# -*- mode: Bash; tab-width: 4; indent-tabs-mode: t; -*-
+# vim:shiftwidth=4:softtabstop=4:tabstop=4:
 
 ######################################################################
 # customize per survey
@@ -186,7 +187,7 @@ if (( $stripe_count > 0 )); then
     for ((i=0; i < $ndevs; i++)); do
         host=${host_names[$i]}
         obd=$(remote_shell $host $lctl device_list | awk "{if (\$2 == \"UP\" &&
-            \$3 == \"osc\") { print \$4 } }")
+            (\$3 == \"osc\" || \$3 == \"osp\")) { print \$4 } }")
         if [ -z "$obd" ]; then
             echo "Need obdfilter to test stripe_count"
             exit 1
@@ -266,6 +267,7 @@ for ((thr = $thrlo; thr <= $thrhi; thr*=2)); do
     if (( thr_per_dir <= 0 )); then
         continue
     fi
+    file_count_per_thread=$((${file_count}/${thr}))
     str=`printf 'mdt %1d file %7d dir %4d thr %4d ' \
     $ndevs $file_count $dir_count $thr`
     echo "=======================> $str" >> $workf
@@ -290,7 +292,7 @@ for ((thr = $thrlo; thr <= $thrhi; thr*=2)); do
             echo >> ${cmdsf}_${host}                                                     \
                 "$lctl > $tmpfi 2>&1                                                     \
                  --threads $thr -$snap $devno test_$test -d /$basedir -D $dir_count      \
-                 -b $start_number -n $file_count"
+                 -b $start_number -n $file_count_per_thread"
         done
         pidcount=0
         for host in ${unique_hosts[@]}; do