From owner-svn-src-head@FreeBSD.ORG Wed Oct 22 21:57:36 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 87C75BC0; Wed, 22 Oct 2014 21:57:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 58EADA3D; Wed, 22 Oct 2014 21:57:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9MLva71098618; Wed, 22 Oct 2014 21:57:36 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9MLvaLD098617; Wed, 22 Oct 2014 21:57:36 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201410222157.s9MLvaLD098617@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Wed, 22 Oct 2014 21:57:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273485 - head/sys/fs/nfsclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Oct 2014 21:57:36 -0000 Author: rmacklem Date: Wed Oct 22 21:57:35 2014 New Revision: 273485 URL: https://svnweb.freebsd.org/changeset/base/273485 Log: Revert r273481 so it can be recoded using fls(), which some feel will make it more readable. Modified: head/sys/fs/nfsclient/nfs_clvfsops.c Modified: head/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvfsops.c Wed Oct 22 21:45:12 2014 (r273484) +++ head/sys/fs/nfsclient/nfs_clvfsops.c Wed Oct 22 21:57:35 2014 (r273485) @@ -552,7 +552,7 @@ static void nfs_decode_args(struct mount *mp, struct nfsmount *nmp, struct nfs_args *argp, const char *hostname, struct ucred *cred, struct thread *td) { - int i, s; + int s; int adjsock; char *p; @@ -621,36 +621,18 @@ nfs_decode_args(struct mount *mp, struct if ((argp->flags & NFSMNT_WSIZE) && argp->wsize > 0) { nmp->nm_wsize = argp->wsize; - /* - * Clip at the power of 2 below the size. There is an - * issue (not isolated) that causes intermittent page - * faults if this is not done. - */ - i = NFS_FABLKSIZE; - for (;;) { - if (i * 2 > nmp->nm_wsize) { - nmp->nm_wsize = i; - break; - } - i *= 2; - } + /* Round down to multiple of blocksize */ + nmp->nm_wsize &= ~(NFS_FABLKSIZE - 1); + if (nmp->nm_wsize <= 0) + nmp->nm_wsize = NFS_FABLKSIZE; } if ((argp->flags & NFSMNT_RSIZE) && argp->rsize > 0) { nmp->nm_rsize = argp->rsize; - /* - * Clip at the power of 2 below the size. There is an - * issue (not isolated) that causes intermittent page - * faults if this is not done. - */ - i = NFS_FABLKSIZE; - for (;;) { - if (i * 2 > nmp->nm_rsize) { - nmp->nm_rsize = i; - break; - } - i *= 2; - } + /* Round down to multiple of blocksize */ + nmp->nm_rsize &= ~(NFS_FABLKSIZE - 1); + if (nmp->nm_rsize <= 0) + nmp->nm_rsize = NFS_FABLKSIZE; } if ((argp->flags & NFSMNT_READDIRSIZE) && argp->readdirsize > 0) {