• Chuck Lever's avatar
    [PATCH] (1/2) clean up RPC over TCP transport socket connect · be83269e
    Chuck Lever authored
    This provides clean up and bug fixes for the RPC layer's TCP socket
    connection management logic.  Trond, Alexey, and DaveM have seen this
    patch.  i've been running it for several weeks here and feel it is ready
    for wider testing.  these two patches are prerequisites for further
    clean-ups and fixes for RPC over TCP.
    
    bugs fixed:
    +  TCP connection establishment now times out after 60 seconds instead of
       hanging for ten minutes.  60 seconds is more in line with how long a
       server takes to reboot.
    +  on a soft-mounted file system, TCP reconnections now time out and fail
       the RPC request, like most other NFS clients, instead of hanging the
       NFS client until the server comes back.
    +  on hard-mounted file systems, the RPC layer now delays 15 seconds
       before retrying after a failed connection attempt instead of retrying
       as soon as it can.
    +  TCP connection error recovery is now more verbose so users can see why
       their NFS sessions are hung.  this can be tuned with future patches if
       it is unreasonably noisy.
    +  the TCP connect logic is cleaned up so adding checks for new errnos
       is easier.
    +  the same code now handles both initial connection and reconnection.
       the original initial connection code did not have comprehensive error
       handling.
    +  some obscure design elements are now documented in comments.
    +  kfree was used by mistake in xprt_destroy.
    be83269e
xprt.c 37.4 KB