svn commit: r229263 - stable/9/sys/fs/nfsclient

Rick Macklem rmacklem at FreeBSD.org
Mon Jan 2 04:25:25 UTC 2012


Author: rmacklem
Date: Mon Jan  2 04:25:25 2012
New Revision: 229263
URL: http://svn.freebsd.org/changeset/base/229263

Log:
  MFC: r227517
  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.

Modified:
  stable/9/sys/fs/nfsclient/nfs_clvfsops.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/fs/nfsclient/nfs_clvfsops.c
==============================================================================
--- stable/9/sys/fs/nfsclient/nfs_clvfsops.c	Mon Jan  2 04:16:45 2012	(r229262)
+++ stable/9/sys/fs/nfsclient/nfs_clvfsops.c	Mon Jan  2 04:25:25 2012	(r229263)
@@ -1222,6 +1222,10 @@ mountnfs(struct nfs_args *argp, struct m
 	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);
 
@@ -1245,7 +1249,6 @@ mountnfs(struct nfs_args *argp, struct m
 		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)


More information about the svn-src-stable-9 mailing list