mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 09:41:03 -04:00
Move the setting of the default value for nm_wcommitsize to
before the nfs_decode_args() call in the new NFS client, so that a specfied command line value won't be overwritten. Also, modify the calculation for small values of desiredvnodes to avoid an unusually large value or a divide by zero crash. It seems that the default value for nm_wcommitsize is very conservative and may need to change at some time. PR: kern/159351 Submitted by: onwahe at gmail.com (earlier version) Reviewed by: jhb MFC after: 2 weeks
This commit is contained in:
parent
a38f2acf11
commit
e42a8d7e24
1 changed files with 4 additions and 1 deletions
|
|
@ -1231,6 +1231,10 @@ mountnfs(struct nfs_args *argp, struct mount *mp, struct sockaddr *nam,
|
|||
nmp->nm_timeo = NFS_TIMEO;
|
||||
nmp->nm_retry = NFS_RETRANS;
|
||||
nmp->nm_readahead = NFS_DEFRAHEAD;
|
||||
if (desiredvnodes >= 11000)
|
||||
nmp->nm_wcommitsize = hibufspace / (desiredvnodes / 1000);
|
||||
else
|
||||
nmp->nm_wcommitsize = hibufspace / 10;
|
||||
|
||||
nfs_decode_args(mp, nmp, argp, hst, cred, td);
|
||||
|
||||
|
|
@ -1252,7 +1256,6 @@ mountnfs(struct nfs_args *argp, struct mount *mp, struct sockaddr *nam,
|
|||
nmp->nm_rsize = NFS_RSIZE;
|
||||
nmp->nm_readdirsize = NFS_READDIRSIZE;
|
||||
}
|
||||
nmp->nm_wcommitsize = hibufspace / (desiredvnodes / 1000);
|
||||
nmp->nm_numgrps = NFS_MAXGRPS;
|
||||
nmp->nm_tprintf_delay = nfs_tprintf_delay;
|
||||
if (nmp->nm_tprintf_delay < 0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue