Whamcloud - gitweb
LU-12741 ptlrpc: do lu_env_refill for new request 14/36714/2
authorMikhail Pershin <mpershin@whamcloud.com>
Fri, 8 Nov 2019 06:26:06 +0000 (09:26 +0300)
committerOleg Drokin <green@whamcloud.com>
Sat, 14 Dec 2019 05:57:18 +0000 (05:57 +0000)
Perform lu_env_refill() prior any new request handling.
That was done already in tgt_request_handle() and is moved
now to ptlrpc_main() to work for any handler as well,
e.g. ldlm_cancel_handler()

Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Change-Id: Ic5d8bfbd845f7e131849078c016f7e13b91d072f
Reviewed-on: https://review.whamcloud.com/36714
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/ptlrpc/service.c
lustre/target/tgt_handler.c

index bb2a274..e68643c 100644 (file)
@@ -2849,6 +2849,9 @@ static int ptlrpc_main(void *arg)
 
                /* reset le_ses to initial state */
                env->le_ses = NULL;
+               /* Refill the context before execution to make sure
+                * all thread keys are allocated */
+               lu_env_refill(env);
                /* Process all incoming reqs before handling any */
                if (ptlrpc_server_request_incoming(svcpt)) {
                        lu_context_enter(&env->le_ctx);
index 76ebeac..4a6443e 100644 (file)
@@ -720,9 +720,6 @@ int tgt_request_handle(struct ptlrpc_request *req)
                }
        }
 
-       /* Refill the context, to make sure all thread keys are allocated */
-       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;