Commit 90bd17c8 authored by Jeff Layton's avatar Jeff Layton Committed by J. Bruce Fields

NLM: have server-side RPC clients default to soft RPC tasks

Now that it no longer does an RPC ping, lockd always ends up queueing
an RPC task for the GRANT_MSG callback. But, it also requeues the block
for later attempts. Since these are hard RPC tasks, if the client we're
calling back goes unresponsive the GRANT_MSG callbacks can stack up in
the RPC queue.

Fix this by making server-side RPC clients default to soft RPC tasks.
lockd requeues the block anyway, so this should be OK.
Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
parent 031fd3aa
...@@ -243,11 +243,18 @@ nlm_bind_host(struct nlm_host *host) ...@@ -243,11 +243,18 @@ nlm_bind_host(struct nlm_host *host)
.program = &nlm_program, .program = &nlm_program,
.version = host->h_version, .version = host->h_version,
.authflavor = RPC_AUTH_UNIX, .authflavor = RPC_AUTH_UNIX,
.flags = (RPC_CLNT_CREATE_HARDRTRY | .flags = (RPC_CLNT_CREATE_NOPING |
RPC_CLNT_CREATE_NOPING |
RPC_CLNT_CREATE_AUTOBIND), RPC_CLNT_CREATE_AUTOBIND),
}; };
/*
* lockd retries server side blocks automatically so we want
* those to be soft RPC calls. Client side calls need to be
* hard RPC tasks.
*/
if (!host->h_server)
args.flags |= RPC_CLNT_CREATE_HARDRTRY;
clnt = rpc_create(&args); clnt = rpc_create(&args);
if (!IS_ERR(clnt)) if (!IS_ERR(clnt))
host->h_rpcclnt = clnt; host->h_rpcclnt = clnt;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment