FreeBSD Bugzilla – Attachment 13942 Details for
Bug 26324
Defaults for NFS mounts over TCP are slow
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 2.01 KB, created by
bg
on 2001-04-03 20:00:03 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
bg
Created:
2001-04-03 20:00:03 UTC
Size:
2.01 KB
patch
obsolete
>--- /sys/nfs/nfs_vfsops.c.ORIG Sun Sep 10 03:45:36 2000 >+++ /sys/nfs/nfs_vfsops.c Mon Apr 2 14:13:35 2001 >@@ -841,7 +841,6 @@ > register struct nfsmount *nmp; > struct nfsnode *np; > int error; >- struct vattr attrs; > > if (mp->mnt_flag & MNT_UPDATE) { > nmp = VFSTONFS(mp); >@@ -883,8 +882,17 @@ > > nmp->nm_timeo = NFS_TIMEO; > nmp->nm_retry = NFS_RETRANS; >- nmp->nm_wsize = NFS_WSIZE; >- nmp->nm_rsize = NFS_RSIZE; >+ if (argp->flags & NFSMNT_NFSV3) { >+ if (argp->sotype == SOCK_STREAM) { >+ nmp->nm_wsize = nmp->nm_rsize = NFS_MAXDATA; >+ } else { >+ nmp->nm_wsize = NFS_WSIZE; >+ nmp->nm_rsize = NFS_RSIZE; >+ } >+ } else { >+ nmp->nm_wsize = NFS_WSIZE; >+ nmp->nm_rsize = NFS_RSIZE; >+ } > nmp->nm_readdirsize = NFS_READDIRSIZE; > nmp->nm_numgrps = NFS_MAXGRPS; > nmp->nm_readahead = NFS_DEFRAHEAD; >@@ -932,10 +940,15 @@ > *vpp = NFSTOV(np); > > /* >- * Get file attributes for the mountpoint. This has the side >- * effect of filling in (*vpp)->v_type with the correct value. >+ * Retrieval of mountpoint attributes is delayed until nfs_root >+ * or nfs_statfs are first called. This will happen either when >+ * we first traverse the mount point or if somebody does a df. >+ * >+ * NFSSTA_GOTFSINFO is used to flag if we have succesfully >+ * retreived mountpoint attributes. In the case of NFSv3 we >+ * also flag static fsinfo. > */ >- VOP_GETATTR(*vpp, &attrs, curproc->p_ucred, curproc); >+ (*vpp)->v_type = VNON; > > /* > * Lose the lock but keep the ref. >@@ -1042,6 +1055,20 @@ > if (error) > return (error); > vp = NFSTOV(np); >+ /* >+ * Get transfer parameters and root vnode attributes. >+ */ >+ if ((nmp->nm_state & NFSSTA_GOTFSINFO) == 0) { >+ if (nmp->nm_flag & NFSMNT_NFSV3) { >+ nfs_fsinfo(nmp, vp, curproc->p_ucred, curproc); >+ mp->mnt_stat.f_iosize = nfs_iosize(nmp); >+ } else { >+ struct vattr attrs; >+ error = VOP_GETATTR(vp, &attrs, curproc->p_ucred, curproc); >+ if (!error) >+ nmp->nm_state |= NFSSTA_GOTFSINFO; >+ } >+ } > if (vp->v_type == VNON) > vp->v_type = VDIR; > vp->v_flag = VROOT;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 26324
: 13942