Whamcloud - gitweb
LU-1548 mdssurvey: fix file_count in mds_survey
authorwangdi <di.wang@whamcloud.com>
Mon, 6 Aug 2012 21:49:26 +0000 (14:49 -0700)
committerOleg Drokin <green@whamcloud.com>
Wed, 8 Aug 2012 19:29:59 +0000 (15:29 -0400)
It should use file_count_per_thread in lctl command,
instead of file_count directly.

Signed-off-by: Wang di <di.wang@whamcloud.com>
Change-Id: I606a988db373c1065544385fdd1dfd42821eef2b
Reviewed-on: http://review.whamcloud.com/3549
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre-iokit/mds-survey/mds-survey

index 19536f2..9c529bf 100755 (executable)
@@ -267,6 +267,7 @@ for ((thr = $thrlo; thr <= $thrhi; thr*=2)); do
     if (( thr_per_dir <= 0 )); then
         continue
     fi
     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
     str=`printf 'mdt %1d file %7d dir %4d thr %4d ' \
     $ndevs $file_count $dir_count $thr`
     echo "=======================> $str" >> $workf
@@ -291,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      \
             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
         done
         pidcount=0
         for host in ${unique_hosts[@]}; do