From: wang di Date: Tue, 6 Aug 2013 07:34:08 +0000 (-0700) Subject: LU-3705 target: refill env before tgt handle request X-Git-Tag: 2.4.91~25 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=bd335a344e3fb33cbab8c6ebae16441f62757211;p=fs%2Flustre-release.git LU-3705 target: refill env before tgt handle request Since those env of each threads might start before the stack is initialized, i.e. the ctxt of some modules might not be initialized yet. So it needs to refill the env before handling the request to make sure all of ctxts are initialized. Signed-off-by: wang di Change-Id: Id60432b3d1aa2f23166f0b8a2f4b208361cec80d Reviewed-on: http://review.whamcloud.com/7244 Tested-by: Hudson Reviewed-by: Alex Zhuravlev Tested-by: Maloo Reviewed-by: Mike Pershin Reviewed-by: Oleg Drokin --- diff --git a/lustre/target/tgt_handler.c b/lustre/target/tgt_handler.c index 0ebfbd0..c5a9fde 100644 --- a/lustre/target/tgt_handler.c +++ b/lustre/target/tgt_handler.c @@ -281,6 +281,10 @@ int tgt_request_handle(struct ptlrpc_request *req) ENTRY; + /* Refill(initilize) the context, in case it is + * not initialized yet. */ + lu_env_refill(req->rq_svc_thread->t_env); + req_capsule_init(&req->rq_pill, req, RCL_SERVER); tsi->tsi_pill = &req->rq_pill; tsi->tsi_env = req->rq_svc_thread->t_env;