Whamcloud - gitweb
LU-3705 target: refill env before tgt handle request 44/7244/4
authorwang di <di.wang@intel.com>
Tue, 6 Aug 2013 07:34:08 +0000 (00:34 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 17 Aug 2013 05:20:18 +0000 (05:20 +0000)
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 <di.wang@intel.com>
Change-Id: Id60432b3d1aa2f23166f0b8a2f4b208361cec80d
Reviewed-on: http://review.whamcloud.com/7244
Tested-by: Hudson
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>

index 0ebfbd0..c5a9fde 100644 (file)
@@ -281,6 +281,10 @@ int tgt_request_handle(struct ptlrpc_request *req)
+       /* 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;