From 8b94e52728439f07b7a9ffe214dd9da993e94b20 Mon Sep 17 00:00:00 2001 From: cel Date: Tue, 23 May 2006 18:48:07 +0000 Subject: NFS over TCP retransmit behavior should default to a 60 second time out, mimicing the NFS reference implementation. NFS over TCP does not need fast retransmit timeouts, since network loss and congestion are managed by the transport (TCP), unlike with NFS over UDP. A long timeout prevents the unnecessary retransmission of non- idempotent NFS requests. Reviewed by: mohans, silby, rees? Sponsored by: Network Appliance, Incorporated --- sys/nfs4client/nfs4_vfsops.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'sys/nfs4client') diff --git a/sys/nfs4client/nfs4_vfsops.c b/sys/nfs4client/nfs4_vfsops.c index d4fc2d6..0eb113b 100644 --- a/sys/nfs4client/nfs4_vfsops.c +++ b/sys/nfs4client/nfs4_vfsops.c @@ -245,12 +245,18 @@ nfs_decode_args(struct nfsmount *nmp, struct nfs_args *argp) int maxio; s = splnet(); + /* * Silently clear NFSMNT_NOCONN if it's a TCP mount, it makes - * no sense in that context. + * no sense in that context. Also, set appropriate retransmit + * and soft timeout behavior. */ - if (argp->sotype == SOCK_STREAM) + if (argp->sotype == SOCK_STREAM) { nmp->nm_flag &= ~NFSMNT_NOCONN; + nmp->nm_flag |= NFSMNT_DUMBTIMR; + nmp->nm_timeo = NFS_MAXTIMEO; + nmp->nm_retry = NFS_RETRANS_TCP; + } nmp->nm_flag &= ~NFSMNT_RDIRPLUS; -- cgit v1.1