From owner-svn-src-all@FreeBSD.ORG Mon Jan 2 04:47:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E0C3106564A; Mon, 2 Jan 2012 04:47:39 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4BAB78FC08; Mon, 2 Jan 2012 04:47:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q024ldUU048340; Mon, 2 Jan 2012 04:47:39 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q024ldHP048338; Mon, 2 Jan 2012 04:47:39 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201201020447.q024ldHP048338@svn.freebsd.org> From: Rick Macklem Date: Mon, 2 Jan 2012 04:47:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229264 - in stable/8/sys: conf fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2012 04:47:39 -0000 Author: rmacklem Date: Mon Jan 2 04:47:38 2012 New Revision: 229264 URL: http://svn.freebsd.org/changeset/base/229264 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/8/sys/fs/nfsclient/nfs_clvfsops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/conf/ldscript.mips.octeon1.32 (props changed) stable/8/sys/conf/ldscript.mips.octeon1.64 (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clvfsops.c Mon Jan 2 04:25:25 2012 (r229263) +++ stable/8/sys/fs/nfsclient/nfs_clvfsops.c Mon Jan 2 04:47:38 2012 (r229264) @@ -1218,6 +1218,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); @@ -1241,7 +1245,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)