diff options
author | Chuck Lever <cel@netapp.com> | 2005-08-25 19:25:55 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2005-09-23 12:38:53 -0400 |
commit | 03bf4b707eee06706c9db343dd5c905b7ee47ed2 (patch) | |
tree | 54f89b578758e2bf2650b647ae1c7100c882a757 /fs/nfs/inode.c | |
parent | 3167e12c0c424f3c323944701615343022d86418 (diff) |
[PATCH] RPC: parametrize various transport connect timeouts
Each transport implementation can now set unique bind, connect,
reestablishment, and idle timeout values. These are variables,
allowing the values to be modified dynamically. This permits
exponential backoff of any of these values, for instance.
As an example, we implement exponential backoff for the connection
reestablishment timeout.
Test-plan:
Destructive testing (unplugging the network temporarily). Connectathon
with UDP and TCP.
Signed-off-by: Chuck Lever <cel@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r-- | fs/nfs/inode.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index b6a1ca508e60..062911e7ceb5 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -369,8 +369,8 @@ static void nfs_init_timeout_values(struct rpc_timeout *to, int proto, unsigned | |||
369 | case IPPROTO_TCP: | 369 | case IPPROTO_TCP: |
370 | if (!to->to_initval) | 370 | if (!to->to_initval) |
371 | to->to_initval = 60 * HZ; | 371 | to->to_initval = 60 * HZ; |
372 | if (to->to_initval > RPC_MAX_TCP_TIMEOUT) | 372 | if (to->to_initval > NFS_MAX_TCP_TIMEOUT) |
373 | to->to_initval = RPC_MAX_TCP_TIMEOUT; | 373 | to->to_initval = NFS_MAX_TCP_TIMEOUT; |
374 | to->to_increment = to->to_initval; | 374 | to->to_increment = to->to_initval; |
375 | to->to_maxval = to->to_initval + (to->to_increment * to->to_retries); | 375 | to->to_maxval = to->to_initval + (to->to_increment * to->to_retries); |
376 | to->to_exponential = 0; | 376 | to->to_exponential = 0; |
@@ -379,9 +379,9 @@ static void nfs_init_timeout_values(struct rpc_timeout *to, int proto, unsigned | |||
379 | default: | 379 | default: |
380 | if (!to->to_initval) | 380 | if (!to->to_initval) |
381 | to->to_initval = 11 * HZ / 10; | 381 | to->to_initval = 11 * HZ / 10; |
382 | if (to->to_initval > RPC_MAX_UDP_TIMEOUT) | 382 | if (to->to_initval > NFS_MAX_UDP_TIMEOUT) |
383 | to->to_initval = RPC_MAX_UDP_TIMEOUT; | 383 | to->to_initval = NFS_MAX_UDP_TIMEOUT; |
384 | to->to_maxval = RPC_MAX_UDP_TIMEOUT; | 384 | to->to_maxval = NFS_MAX_UDP_TIMEOUT; |
385 | to->to_exponential = 1; | 385 | to->to_exponential = 1; |
386 | break; | 386 | break; |
387 | } | 387 | } |