Date: Thu, 25 Jul 1996 16:07:09 +0100 (BST) From: Doug Rabson <dfr@render.com> To: Robert Withrow <bwithrow@BayNetworks.com> Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: 2.1.5 -- NFS/AMD problems Message-ID: <Pine.BSI.3.95.960725154537.24582C-100000@minnow.render.com> In-Reply-To: <199607251415.KAA18880@tuva.engeast.baynetworks.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 25 Jul 1996, Robert Withrow wrote: > It seems that 2.1.5's nfs suffers from the same problem that > 2.1's nfs suffered from, namely that AMD direct maps don't work > correctly with it. Someone sent me a patch for 3 files in > 2.1's /sys/nfs that seemed to fix the problem. > > I thought he said these patches made it into -stable, but I guess not. > > Does someone have patches for 2.1.5's nfs, or will the 2.1 patches > still work? I just checked and the diffs between 2.1.0 and 2.1.5 for NFS are pretty small. Try applying the patches and see what happens. Alternatively, you could try this patch which I just made by hand-merging the amd direct fixes from -current into -stable. I have not tested this. I haven't even compiled it, so your milage might vary considerably :-) Index: nfs_bio.c =================================================================== RCS file: /home/ncvs/src/sys/nfs/nfs_bio.c,v retrieving revision 1.14.4.2 diff -u -r1.14.4.2 nfs_bio.c --- nfs_bio.c 1996/06/08 20:22:38 1.14.4.2 +++ nfs_bio.c 1996/07/25 15:00:11 @@ -114,7 +114,7 @@ * attributes this could be forced by setting n_attrstamp to 0 before * the VOP_GETATTR() call. */ - if ((nmp->nm_flag & NFSMNT_NQNFS) == 0 && vp->v_type != VLNK) { + if ((nmp->nm_flag & NFSMNT_NQNFS) == 0) { if (np->n_flag & NMODIFIED) { if ((nmp->nm_flag & NFSMNT_MYWRITE) == 0 || vp->v_type != VREG) { Index: nfs_subs.c =================================================================== RCS file: /home/ncvs/src/sys/nfs/nfs_subs.c,v retrieving revision 1.15.4.4 diff -u -r1.15.4.4 nfs_subs.c --- nfs_subs.c 1996/03/21 20:30:02 1.15.4.4 +++ nfs_subs.c 1996/07/25 15:01:41 @@ -750,7 +750,7 @@ * information. */ np = VTONFS(vp); - if (vp->v_type == VNON) { + if (vp->v_type != vtyp) { if (vtyp == VCHR && rdev == 0xffffffff) vp->v_type = vtyp = VFIFO; else Index: nfs_vfsops.c =================================================================== RCS file: /home/ncvs/src/sys/nfs/nfs_vfsops.c,v retrieving revision 1.15.2.1 diff -u -r1.15.2.1 nfs_vfsops.c --- nfs_vfsops.c 1996/03/21 20:30:05 1.15.2.1 +++ nfs_vfsops.c 1996/07/25 15:04:59 @@ -473,6 +473,7 @@ register struct nfsmount *nmp; struct nfsnode *np; int error; + struct vattr attrs; if (mp->mnt_flag & MNT_UPDATE) { nmp = VFSTONFS(mp); @@ -598,6 +599,12 @@ goto bad; *vpp = NFSTOV(np); + /* + * Get file attributes for the mountpoint. This has the side + * effect of filling in (*vpp)->v_type with the correct value. + */ + VOP_GETATTR(*vpp, &attrs, curproc->p_ucred, curproc); + return (0); bad: nfs_disconnect(nmp); @@ -701,7 +708,6 @@ if (error) return (error); vp = NFSTOV(np); - vp->v_type = VDIR; vp->v_flag = VROOT; *vpp = vp; return (0); -- Doug Rabson, Microsoft RenderMorphics Ltd. Mail: dfr@render.com Phone: +44 171 251 4411 FAX: +44 171 251 0939
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSI.3.95.960725154537.24582C-100000>