diff options
author | Benjamin Coddington <bcodding@redhat.com> | 2014-09-23 12:26:20 -0400 |
---|---|---|
committer | Stefan Bader <stefan.bader@canonical.com> | 2015-05-29 11:54:18 +0200 |
commit | 67e6c7b65720b1ff4224af0c3ba333fe9de00241 (patch) | |
tree | 24569b57001614aaa08b8ce6670a0d07e9f6c8ff | |
parent | 4f6c92023ca0f931dcdda8ccfea73ade7043b32c (diff) | |
download | linux-2.6.32.y-drm33.z-67e6c7b65720b1ff4224af0c3ba333fe9de00241.tar.gz |
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>
[bwh: Backported to 3.2: not using RPC_TASK_SOFTCONN]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
(cherry picked from commit 3aabe891f32c209a2be7cd5581d2634020e801c1)
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
-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 f956651d0f651a..48de6a5c000487 100644 --- a/fs/lockd/mon.c +++ b/fs/lockd/mon.c @@ -109,6 +109,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, 0); + 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, 0); + } if (status < 0) dprintk("lockd: NSM upcall RPC failed, status=%d\n", status); |