From owner-freebsd-hackers Thu Jul 25 08:13:39 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id IAA04931 for hackers-outgoing; Thu, 25 Jul 1996 08:13:39 -0700 (PDT) Received: from who.cdrom.com (who.cdrom.com [204.216.27.3]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id IAA04926 for ; Thu, 25 Jul 1996 08:13:36 -0700 (PDT) Received: from minnow.render.com (render.demon.co.uk [158.152.30.118]) by who.cdrom.com (8.6.12/8.6.11) with ESMTP id IAA02037 for ; Thu, 25 Jul 1996 08:13:33 -0700 Received: from localhost (dfr@localhost) by minnow.render.com (8.6.12/8.6.9) with SMTP id QAA25772; Thu, 25 Jul 1996 16:07:10 +0100 Date: Thu, 25 Jul 1996 16:07:09 +0100 (BST) From: Doug Rabson To: Robert Withrow cc: freebsd-hackers@FreeBSD.ORG Subject: Re: 2.1.5 -- NFS/AMD problems In-Reply-To: <199607251415.KAA18880@tuva.engeast.baynetworks.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk 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