[PATCH 22/23] staging/lustre/tests: check nr_local in ofd_preprw()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jian Yu <jian.yu@xxxxxxxxx>

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.

Intel-bug-id: LU-2598
Lustre-commit: fd7466439be3039cb27f723c57be73317b5e48ba
Lustre-change: http://review.whamcloud.com/6394
Signed-off-by: Jian Yu <jian.yu@xxxxxxxxx>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@xxxxxxxxx>
Reviewed-by: Andreas Dilger <andreas.dilger@xxxxxxxxx>

[updated for upstream kernel submission]
Signed-off-by: Peng Tao <tao.peng@xxxxxxx>
Signed-off-by: Andreas Dilger <andreas.dilger@xxxxxxxxx>
---
 .../staging/lustre/lustre/obdecho/echo_client.c    |    4 ++++
 1 file changed, 4 insertions(+)

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:
-- 
1.7.9.5

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux