aboutsummaryrefslogtreecommitdiffstats
path: root/fs/lockd/host.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2008-02-06 11:34:11 -0500
committerJ. Bruce Fields <bfields@citi.umich.edu>2008-02-10 18:09:36 -0500
commit90bd17c87821fe0e055e0f9a7446c2875f31eb4c (patch)
tree21524f248ed516570dcc1a0f6a66a74e3a275e95 /fs/lockd/host.c
parent031fd3aa20fcf6d1862ea7814ee8b2caf36c0d78 (diff)
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: Jeff Layton <jlayton@redhat.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'fs/lockd/host.c')
-rw-r--r--fs/lockd/host.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/fs/lockd/host.c b/fs/lockd/host.c
index 00063ee0b55c..f1ef49fff118 100644
--- a/fs/lockd/host.c
+++ b/fs/lockd/host.c
@@ -243,11 +243,18 @@ nlm_bind_host(struct nlm_host *host)
243 .program = &nlm_program, 243 .program = &nlm_program,
244 .version = host->h_version, 244 .version = host->h_version,
245 .authflavor = RPC_AUTH_UNIX, 245 .authflavor = RPC_AUTH_UNIX,
246 .flags = (RPC_CLNT_CREATE_HARDRTRY | 246 .flags = (RPC_CLNT_CREATE_NOPING |
247 RPC_CLNT_CREATE_NOPING |
248 RPC_CLNT_CREATE_AUTOBIND), 247 RPC_CLNT_CREATE_AUTOBIND),
249 }; 248 };
250 249
250 /*
251 * lockd retries server side blocks automatically so we want
252 * those to be soft RPC calls. Client side calls need to be
253 * hard RPC tasks.
254 */
255 if (!host->h_server)
256 args.flags |= RPC_CLNT_CREATE_HARDRTRY;
257
251 clnt = rpc_create(&args); 258 clnt = rpc_create(&args);
252 if (!IS_ERR(clnt)) 259 if (!IS_ERR(clnt))
253 host->h_rpcclnt = clnt; 260 host->h_rpcclnt = clnt;