Revert r273481 so it can be recoded using fls(), which

some feel will make it more readable.
This commit is contained in:
Rick Macklem 2014-10-22 21:57:35 +00:00
parent 9e3a53fd35
commit fcf121d481
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=273485

View File

@ -552,7 +552,7 @@ static void
nfs_decode_args(struct mount *mp, struct nfsmount *nmp, struct nfs_args *argp, nfs_decode_args(struct mount *mp, struct nfsmount *nmp, struct nfs_args *argp,
const char *hostname, struct ucred *cred, struct thread *td) const char *hostname, struct ucred *cred, struct thread *td)
{ {
int i, s; int s;
int adjsock; int adjsock;
char *p; char *p;
@ -621,36 +621,18 @@ nfs_decode_args(struct mount *mp, struct nfsmount *nmp, struct nfs_args *argp,
if ((argp->flags & NFSMNT_WSIZE) && argp->wsize > 0) { if ((argp->flags & NFSMNT_WSIZE) && argp->wsize > 0) {
nmp->nm_wsize = argp->wsize; nmp->nm_wsize = argp->wsize;
/* /* Round down to multiple of blocksize */
* Clip at the power of 2 below the size. There is an nmp->nm_wsize &= ~(NFS_FABLKSIZE - 1);
* issue (not isolated) that causes intermittent page if (nmp->nm_wsize <= 0)
* faults if this is not done. nmp->nm_wsize = NFS_FABLKSIZE;
*/
i = NFS_FABLKSIZE;
for (;;) {
if (i * 2 > nmp->nm_wsize) {
nmp->nm_wsize = i;
break;
}
i *= 2;
}
} }
if ((argp->flags & NFSMNT_RSIZE) && argp->rsize > 0) { if ((argp->flags & NFSMNT_RSIZE) && argp->rsize > 0) {
nmp->nm_rsize = argp->rsize; nmp->nm_rsize = argp->rsize;
/* /* Round down to multiple of blocksize */
* Clip at the power of 2 below the size. There is an nmp->nm_rsize &= ~(NFS_FABLKSIZE - 1);
* issue (not isolated) that causes intermittent page if (nmp->nm_rsize <= 0)
* faults if this is not done. nmp->nm_rsize = NFS_FABLKSIZE;
*/
i = NFS_FABLKSIZE;
for (;;) {
if (i * 2 > nmp->nm_rsize) {
nmp->nm_rsize = i;
break;
}
i *= 2;
}
} }
if ((argp->flags & NFSMNT_READDIRSIZE) && argp->readdirsize > 0) { if ((argp->flags & NFSMNT_READDIRSIZE) && argp->readdirsize > 0) {