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
This commit is contained in:
parent
94163ea283
commit
6d0699a5ba
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=158860
@ -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;
|
||||
|
||||
|
@ -53,7 +53,8 @@
|
||||
#define NFS_MAXTIMEO (60 * NFS_HZ) /* Max timeout to backoff to */
|
||||
#define NFS_MINIDEMTIMEO (5 * NFS_HZ) /* Min timeout for non-idempotent ops*/
|
||||
#define NFS_MAXREXMIT 100 /* Stop counting after this many */
|
||||
#define NFS_RETRANS 10 /* Num of retrans for soft mounts */
|
||||
#define NFS_RETRANS 10 /* Num of retrans for UDP soft mounts */
|
||||
#define NFS_RETRANS_TCP 2 /* Num of retrans for TCP soft mounts */
|
||||
#define NFS_MAXGRPS 16 /* Max. size of groups list */
|
||||
#ifndef NFS_MINATTRTIMO
|
||||
#define NFS_MINATTRTIMO 3 /* VREG attrib cache timeout in sec */
|
||||
|
@ -545,10 +545,15 @@ nfs_decode_args(struct mount *mp, struct nfsmount *nmp, struct nfs_args *argp)
|
||||
|
||||
/*
|
||||
* Silently clear NFSMNT_NOCONN if it's a TCP mount, it makes
|
||||
* no sense in that context.
|
||||
* no sense in that context. Also, set up 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;
|
||||
}
|
||||
|
||||
/* Also clear RDIRPLUS if not NFSv3, it crashes some servers */
|
||||
if ((argp->flags & NFSMNT_NFSV3) == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user