Skip to content

EXPERIMENTAL: soft connect semantics for rpcbind

Chuck Lever linux-nfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7SUNRPC: Don't report a connect delay of 0 secondsnet/sunrpc/xprtsock.c+4 -30 replies
2/7SUNRPC: Allow RPCs to fail quickly if the server is unreachableinclude/linux/sunrpc/sched.h net/sunrpc/clnt.c net/sunrpc/xprtsock.c+10 -14 replies
3/7SUNRPC: Clean up call_transmit_status()net/sunrpc/clnt.c+12 -124 replies
4/7SUNRPC: maintain a single transport for rpcbind upcallsnet/sunrpc/rpcb_clnt.c net/sunrpc/sunrpc_syms.c+54 -150 replies
5/7SUNRPC: Use TCP for local rpcbind upcallsnet/sunrpc/rpcb_clnt.c+2 -20 replies
6/7SUNRPC: Use soft connects for autobinding over TCPnet/sunrpc/clnt.c net/sunrpc/rpcb_clnt.c+16 -20 replies
7/7SUNRPC: Use soft connect semantics when performing RPC pingnet/sunrpc/clnt.c+1 -11 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/7] EXPERIMENTAL: soft connect semantics for rpcbind

These need further refinement, but I'm posting now to spark some discussion.

To address manifold reports of svc_unregister() hanging (either at shutdown or if rpcbind simply wasn't ever started), these patches add a new per-request soft connect semantic, and update the kernel's rpcbind client to use a connection-oriented transport for local queries. This should cause the kernel's local rpcbind queries to fail immediately if rpcbind isn't reachable.

This can work with either TCP or connected UDP. I used TCP here merely as an example.

The final two patches have not been tested, but provide a taste of other uses for the soft connect semantic. One possible use is to address Ian's NFSv4 mount hang problems by making rpc_ping() fail if it cannot connect to the server.

We can also make use of this new feature to do proper "hangless" NFS v2/v3 version and transport negotiation in the kernel, although that is beyond the scope of the current patch set.

---

Chuck Lever (7):
SUNRPC: Use soft connect semantics when performing RPC ping
SUNRPC: Use soft connects for autobinding over TCP
SUNRPC: Use TCP for local rpcbind upcalls
SUNRPC: maintain a single transport for rpcbind upcalls
SUNRPC: Clean up call_transmit_status()
SUNRPC: Allow RPCs to fail quickly if the server is unreachable
SUNRPC: Don't report a connect delay of 0 seconds

 include/linux/sunrpc/sched.h |    2 +
 net/sunrpc/clnt.c            |   45 ++++++++++++++++++++--------
 net/sunrpc/rpcb_clnt.c       |   68 ++++++++++++++++++++++++++++++++----------
 net/sunrpc/sunrpc_syms.c     |    5 +++
 net/sunrpc/xprtsock.c        |    9 +++---
 5 files changed, 96 insertions(+), 33 deletions(-)
Signature · 1 line
Chuck Lever <[email protected]>