summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJian Yu <jian.yu@intel.com>2013-06-03 13:40:59 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-03 18:26:37 (GMT)
commit09b0170e677708547df3f77ad8dccc29c88e2e81 (patch)
tree50637eec61f48c0cddc9ab9cac38d7c26be32211
parent451721cc08ef88db74c7de4283195fe6c2005d91 (diff)
downloadlinux-fsl-qoriq-09b0170e677708547df3f77ad8dccc29c88e2e81.tar.xz
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/6394 Signed-off-by: Jian Yu <jian.yu@intel.com> Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Peng Tao <tao.peng@emc.com> Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/lustre/lustre/obdecho/echo_client.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/staging/lustre/lustre/obdecho/echo_client.c b/drivers/staging/lustre/lustre/obdecho/echo_client.c
index bd86499..184195f 100644
--- a/drivers/staging/lustre/lustre/obdecho/echo_client.c
+++ b/drivers/staging/lustre/lustre/obdecho/echo_client.c
@@ -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: