From 9f38647a7b24a834ecbb35e36e42f76d907adecf Mon Sep 17 00:00:00 2001 From: Rahul Deshmukh Date: Thu, 8 May 2014 16:52:11 +0530 Subject: [PATCH] LU-5031 tests: obdfilter-survey fixes 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 Change-Id: I4360b52d1b8d828def6cf316abc09383fcaaaa94 Reviewed-on: http://review.whamcloud.com/10264 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Cliff White Reviewed-by: Bob Glossman Reviewed-by: Oleg Drokin --- lustre-iokit/obdfilter-survey/obdfilter-survey | 4 ++-- lustre/obdecho/echo_client.c | 8 ++++---- lustre/tests/obdfilter-survey.sh | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lustre-iokit/obdfilter-survey/obdfilter-survey b/lustre-iokit/obdfilter-survey/obdfilter-survey index 0f8d000..c65193e 100755 --- a/lustre-iokit/obdfilter-survey/obdfilter-survey +++ b/lustre-iokit/obdfilter-survey/obdfilter-survey @@ -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 diff --git a/lustre/obdecho/echo_client.c b/lustre/obdecho/echo_client.c index 762b9ae..29e4a91 100644 --- a/lustre/obdecho/echo_client.c +++ b/lustre/obdecho/echo_client.c @@ -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; diff --git a/lustre/tests/obdfilter-survey.sh b/lustre/tests/obdfilter-survey.sh index e93fe2c..cb54ca2 100644 --- a/lustre/tests/obdfilter-survey.sh +++ b/lustre/tests/obdfilter-survey.sh @@ -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 -- 1.8.3.1