[lustre-devel] [PATCH 008/622] lustre: obdecho: turn on async flag only for mode 3

James Simmons jsimmons at infradead.org
Thu Feb 27 13:07:56 PST 2020


From: Rahul Deshmukh <rahul_deshmukh at xyratex.com>

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 fixes the last problem which is kernel side.

WC-bug-id: https://jira.whamcloud.com/browse/LU-5031
Lustre-commit: 9f38647a7b24 ("LU-5031 tests: obdfilter-survey fixes")
Signed-off-by: Rahul Deshmukh <rahul_deshmukh at xyratex.com>
Reviewed-on: http://review.whamcloud.com/10264
Reviewed-by: Cliff White <cliff.white at intel.com>
Reviewed-by: Bob Glossman <bob.glossman at intel.com>
Reviewed-by: Oleg Drokin <green at whamcloud.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
---
 fs/lustre/obdecho/echo_client.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/fs/lustre/obdecho/echo_client.c b/fs/lustre/obdecho/echo_client.c
index ca963bb..3984cb4 100644
--- a/fs/lustre/obdecho/echo_client.c
+++ b/fs/lustre/obdecho/echo_client.c
@@ -1425,7 +1425,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;
 
 	LASSERT(oa->o_valid & OBD_MD_FLGROUP);
@@ -1438,14 +1438,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 && 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;
-- 
1.8.3.1



More information about the lustre-devel mailing list