Skip to content

Statd port change recovery

Benjamin Coddington linux-nfs 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2SUNRPC: Don't wake tasks during connection abortinclude/linux/sunrpc/xprt.h net/sunrpc/xprtsock.c+5 -00 replies
2/2lockd: Try to reconnect if statd has movedfs/lockd/mon.c+6 -00 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/2] Statd port change recovery

These two attempt to address the issue of the kernel not recovering from a statd port change, which Bruce pointed out in

http://marc.info/?t=140865700700001&r=1&w=2

The second patch here re-attempts the call after doing rpc_force_rebind which is basically copied from what NLM would do in the same case. However, while working on that I discovered that when the transport attempts to reuse a socket in the first call after rpc_force_rebind, it calls kernel_connect with AF_UNSPEC to disconnect, which wakes the task in xs_error_report. The change in the task's status causes the first call after rpc_force_rebind to fail, and a soft task returns which would otherwise succeed if the connection had already been up.

The first patch tries to remedy this by not waking the task if we end up in xs_error_report while trying to reuse the connection. We expect to end up in xs_error_report with an error, but we don't want to wake the task yet since we're already set up to immediately reconnect.

Benjamin Coddington (2):
SUNRPC: Don't wake tasks during connection abort
lockd: Try to reconnect if statd has moved

 fs/lockd/mon.c              |    6 ++++++
 include/linux/sunrpc/xprt.h |    1 +
 net/sunrpc/xprtsock.c       |    4 ++++
 3 files changed, 11 insertions(+), 0 deletions(-)