Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!newshost.nla.gov.au!act.news.telstra.net!vic.news.telstra.net!news.mira.net.au!harbinger.cc.monash.edu.au!news.cs.su.oz.au!metro!metro!munnari.OZ.AU!news.ecn.uoknor.edu!qns3.qns.com!imci4!newsfeed.internetmci.com!in1.uu.net!fu-berlin.de!lislip.physik.fu-berlin.DE!not-for-mail From: graichen@mail.physik.fu-berlin.de (Thomas Graichen) Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: AMD -- any pros around? Date: 23 Mar 1996 08:46:32 GMT Organization: his FreeBSD box :-) Lines: 84 Message-ID: <4j0dp8$1a5@mordillo.physik.fu-berlin.de> References: <315318C7.41C67EA6@baynetworks.com> NNTP-Posting-Host: lislip.physik.fu-berlin.de (130.133.3.126) X-Access: 16 17 18 X-Newsreader: TIN [version 1.2 PL2] Robert Withrow (bwithrow@baynetworks.com) wrote: : I can get some things to work with AMD like they do with : sun automount. : What I can't seem to figure out is how to make amd : do what sun automount does for ``direct'' maps. The : type=direct AMD file system seems to be the right : idea, but I can't get it to work as described. : Any pros who do this? it's broken in 2.1.0 (don't know if in -stable too - but i think it's fixed in -current) - here's a patch against 2.1.0 which works for me for more than half a year now without any problems - add it - recompile your kernel _ad_ your lkm_nfs.o and you should be fine (you also should ad "#define PRECISE_SYMLINKS" to the file os-bsd44.h of amd and rebuild amd - else you'll get some problems with /bin/sh t --- sys/nfs/nfs_bio.c~ Mon May 29 20:12:35 1995 +++ sys/nfs/nfs_bio.c Thu Aug 31 21:27:38 1995 @@ -173,7 +173,11 @@ return (error); } } - if (np->n_flag & NQNFSNONCACHE) { + /* + * Don't cache magic amd symlinks. + */ + if (np->n_flag & NQNFSNONCACHE + || ((vp->v_flag & VROOT) && vp->v_type == VLNK)) { switch (vp->v_type) { case VREG: error = nfs_readrpc(vp, uio, cred); --- sys/nfs/nfs_subs.c~ Mon May 29 20:12:43 1995 +++ sys/nfs/nfs_subs.c Thu Aug 31 21:27:54 1995 @@ -729,7 +729,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 --- sys/nfs/nfs_vfsops.c~ Thu Jun 1 23:13:15 1995 +++ sys/nfs/nfs_vfsops.c Thu Aug 31 21:29:28 1995 @@ -425,6 +425,7 @@ register struct nfsmount *nmp; struct nfsnode *np; int error; + struct vattr attrs; if (mp->mnt_flag & MNT_UPDATE) { nmp = VFSTONFS(mp); @@ -549,6 +550,7 @@ if (error) goto bad; *vpp = NFSTOV(np); + VOP_GETATTR(*vpp, &attrs, curproc->p_ucred, curproc); return (0); bad: @@ -653,7 +655,8 @@ if (error) return (error); vp = NFSTOV(np); - vp->v_type = VDIR; + if (vp->v_type == VNON) + vp->v_type = VDIR; vp->v_flag = VROOT; *vpp = vp; return (0); -- thomas graichen graichen@mail.physik.fu-berlin.de graichen@FreeBSD.org perfection is reached, not when there is no longer anything to add, but when there is no longer anything to take away antoine de saint-exupery