diff options
author | Benjamin Coddington <bcodding@redhat.com> | 2014-09-23 12:26:20 -0400 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2014-11-13 19:02:06 +0100 |
commit | 92d945892fb00d0e0e22c1bcc77da9413b1a1395 (patch) | |
tree | 5ffc1449207fdb3aac31ee9594750d0ce3572752 | |
parent | abc07cd01c51fb54088c6bc8ee654d104a5ec7d9 (diff) | |
download | lwn-92d945892fb00d0e0e22c1bcc77da9413b1a1395.tar.gz lwn-92d945892fb00d0e0e22c1bcc77da9413b1a1395.zip |
lockd: Try to reconnect if statd has moved
commit 173b3afceebe76fa2205b2c8808682d5b541fe3c upstream.
If rpc.statd is restarted, upcalls to monitor hosts can fail with
ECONNREFUSED. In that case force a lookup of statd's new port and retry the
upcall.
Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
-rw-r--r-- | fs/lockd/mon.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/lockd/mon.c b/fs/lockd/mon.c index 1812f026960c..6ae664b489af 100644 --- a/fs/lockd/mon.c +++ b/fs/lockd/mon.c @@ -159,6 +159,12 @@ static int nsm_mon_unmon(struct nsm_handle *nsm, u32 proc, struct nsm_res *res, msg.rpc_proc = &clnt->cl_procinfo[proc]; status = rpc_call_sync(clnt, &msg, RPC_TASK_SOFTCONN); + if (status == -ECONNREFUSED) { + dprintk("lockd: NSM upcall RPC failed, status=%d, forcing rebind\n", + status); + rpc_force_rebind(clnt); + status = rpc_call_sync(clnt, &msg, RPC_TASK_SOFTCONN); + } if (status < 0) dprintk("lockd: NSM upcall RPC failed, status=%d\n", status); |