Whamcloud - gitweb
LU-5031 tests: obdfilter-survey fixes 64/10264/3
authorRahul Deshmukh <rahul_deshmukh@xyratex.com>
Thu, 8 May 2014 11:22:11 +0000 (16:52 +0530)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 15 Jul 2014 03:48:11 +0000 (03:48 +0000)
There are couple of problems in obdfilter-survey:
- Type of test brw i.e. "g" was not followed with npages,
- Target netdisk was not set properly and
- Turn ON async flag only for mode 3.
This patch fixed the above mention problems.

Signed-off-by: Rahul Deshmukh <rahul_deshmukh@xyratex.com>
Change-Id: I4360b52d1b8d828def6cf316abc09383fcaaaa94
Reviewed-on: http://review.whamcloud.com/10264
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Cliff White <cliff.white@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre-iokit/obdfilter-survey/obdfilter-survey
lustre/obdecho/echo_client.c
lustre/tests/obdfilter-survey.sh

index 0f8d000..c65193e 100755 (executable)
@@ -180,7 +180,7 @@ testname2type () {
 # for "echo_client + osc" case, "BRW" mode should be used
 testcase2mode() {
     case $case in
-    disk) echo "p$1";;
+    disk) echo "p";;
     *)    echo "g";;
     esac
 }
@@ -508,7 +508,7 @@ for ((rsz = $rszlo; rsz <= $rszhi; rsz*=2)); do
                        "$lctl > $tmpfi 2>&1 \\
                          --threads $thr -$snap $devno \\
                          test_brw $count `testname2type $test` q $pages \\
-                         ${thr_per_obj}t${first_obj} `testcase2mode $pages` &"
+                         ${thr_per_obj}t${first_obj} `testcase2mode`$pages &"
                 done
                 pidcount=0
                 for host in ${unique_hosts[@]}; do
index 762b9ae..29e4a91 100644 (file)
@@ -2605,7 +2605,7 @@ static int echo_client_brw_ioctl(const struct lu_env *env, int rw,
         struct obdo *oa = &data->ioc_obdo1;
         struct echo_object *eco;
         int rc;
-        int async = 1;
+        int async = 0;
         long test_mode;
         ENTRY;
 
@@ -2619,14 +2619,14 @@ static int echo_client_brw_ioctl(const struct lu_env *env, int rw,
 
        /* OFD/obdfilter works only via prep/commit */
         test_mode = (long)data->ioc_pbuf1;
-        if (test_mode == 1)
-                async = 0;
-
         if (ed->ed_next == NULL && test_mode != 3) {
                 test_mode = 3;
                 data->ioc_plen1 = data->ioc_count;
         }
 
+       if (test_mode == 3)
+               async = 1;
+
         /* Truncate batch size to maximum */
         if (data->ioc_plen1 > PTLRPC_MAX_BRW_SIZE)
                 data->ioc_plen1 = PTLRPC_MAX_BRW_SIZE;
index e93fe2c..cb54ca2 100644 (file)
@@ -50,7 +50,7 @@ get_targets () {
                 for d in $devs; do
                         # if oss is local -- obdfilter-survey needs dev wo/ host
                         target=$d
-                        [[ $oss = `hostname` && "$1" == "netdisk" ]] || target=$nid:$target
+                        [[ $oss = `hostname` && "$1" == "disk" ]] || target=$nid:$target
                         targets="$targets $target"
                 done
         done