diff options
| author | Chuck Lever <cel@citi.umich.edu> | 2002-09-17 20:17:14 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-09-17 20:17:14 -0700 |
| commit | be83269e3ebdd17b05f94fb64fdcf616c9d94b6f (patch) | |
| tree | 406ee662210ebaad43db42b6458af5d9301ab995 /include/linux | |
| parent | c13e8f03ad78a9928ea7a820430b67066fb318f7 (diff) | |
[PATCH] (1/2) clean up RPC over TCP transport socket connect
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.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/sunrpc/xprt.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 2ce2c8223384..35ff9e0192e1 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h @@ -44,6 +44,19 @@ #define RPC_MAX_UDP_TIMEOUT (60*HZ) #define RPC_MAX_TCP_TIMEOUT (600*HZ) +/* + * Wait duration for an RPC TCP connection to be established. Solaris + * NFS over TCP uses 60 seconds, for example, which is in line with how + * long a server takes to reboot. + */ +#define RPC_CONNECT_TIMEOUT (60*HZ) + +/* + * Delay an arbitrary number of seconds before attempting to reconnect + * after an error. + */ +#define RPC_REESTABLISH_TIMEOUT (15*HZ) + /* RPC call and reply header size as number of 32bit words (verifier * size computed separately) */ |
