mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
SUNRPC: new interface to force an RPC rebind
We'd like to hide fields in rpc_xprt and rpc_clnt from upper layer protocols. Start by creating an API to force RPC rebind, replacing logic that simply sets cl_port to zero. Test-plan: Destructive testing (unplugging the network temporarily). Connectathon with UDP and TCP. NFSv2/3 and NFSv4 mounting should be carefully checked. Probably need to rig a server where certain services aren't running, or that returns an error for some typical operation. Signed-off-by: Chuck Lever <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
This commit is contained in:
parent
0210714834
commit
35f5a422ce
3 changed files with 18 additions and 8 deletions
|
|
@ -177,7 +177,7 @@ nlm_bind_host(struct nlm_host *host)
|
|||
if ((clnt = host->h_rpcclnt) != NULL) {
|
||||
xprt = clnt->cl_xprt;
|
||||
if (time_after_eq(jiffies, host->h_nextrebind)) {
|
||||
clnt->cl_port = 0;
|
||||
rpc_force_rebind(clnt);
|
||||
host->h_nextrebind = jiffies + NLM_HOST_REBIND;
|
||||
dprintk("lockd: next rebind in %ld jiffies\n",
|
||||
host->h_nextrebind - jiffies);
|
||||
|
|
@ -217,7 +217,7 @@ nlm_rebind_host(struct nlm_host *host)
|
|||
{
|
||||
dprintk("lockd: rebind host %s\n", host->h_name);
|
||||
if (host->h_rpcclnt && time_after_eq(jiffies, host->h_nextrebind)) {
|
||||
host->h_rpcclnt->cl_port = 0;
|
||||
rpc_force_rebind(host->h_rpcclnt);
|
||||
host->h_nextrebind = jiffies + NLM_HOST_REBIND;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue