Skip to content

Commit

Permalink
lockd: Try to reconnect if statd has moved
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: [email protected]
Signed-off-by: Trond Myklebust <[email protected]>
  • Loading branch information
Benjamin Coddington authored and trondmypd committed Sep 25, 2014
1 parent a743419 commit 173b3af
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions fs/lockd/mon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 173b3af

Please sign in to comment.