Commit 09b0170e authored by Jian Yu's avatar Jian Yu Committed by Greg Kroah-Hartman

staging/lustre/tests: check nr_local in ofd_preprw()

This patch checks the number of bulk I/O RPC pages with
PTLRPC_MAX_BRW_PAGES in ofd_preprw() to avoid
LASSERT(iobuf->dr_npages < iobuf->dr_max_pages) occurring
while larger I/O size is specified.

The patch also fixes echo_client_prep_commit() to reuse
the env context so as to avoid LASSERT(info->fti_exp == NULL)
occurring while the bulk I/O size is larger than
PTLRPC_MAX_BRW_SIZE.

The patch also improves obdfilter-survey to handle the
case while interoprating with old server.

[picked echo client part for upstream kernel submission]
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2598
Lustre-change: http://review.whamcloud.com/6394Signed-off-by: default avatarJian Yu <jian.yu@intel.com>
Reviewed-by: default avatarAlex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Signed-off-by: default avatarPeng Tao <tao.peng@emc.com>
Signed-off-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 451721cc
......@@ -2650,6 +2650,10 @@ static int echo_client_prep_commit(const struct lu_env *env,
/* Reset oti otherwise it would confuse ldiskfs. */
memset(oti, 0, sizeof(*oti));
/* Reuse env context. */
lu_context_exit((struct lu_context *)&env->le_ctx);
lu_context_enter((struct lu_context *)&env->le_ctx);
}
out:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment