Add support for amd direct maps.

Reviewed by:	Thomas Graichen <graichen@sirius.physik.fu-berlin.de>
This commit is contained in:
Doug Rabson 1995-08-24 10:17:39 +00:00
parent f37f4df155
commit 27df97742b
9 changed files with 47 additions and 34 deletions

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_lookup.c 8.4 (Berkeley) 2/16/94
* $Id: vfs_lookup.c,v 1.7 1995/05/30 08:06:33 rgrimes Exp $
* $Id: vfs_lookup.c,v 1.8 1995/07/31 00:35:46 bde Exp $
*/
#include <sys/param.h>
@ -458,23 +458,6 @@ unionlookup:
}
dp = ndp->ni_vp;
/*
* Check for symbolic link
*/
if ((dp->v_type == VLNK) &&
((cnp->cn_flags & FOLLOW) || trailing_slash ||
*ndp->ni_next == '/')) {
cnp->cn_flags |= ISSYMLINK;
return (0);
}
/*
* Check for bogus trailing slashes.
*/
if (trailing_slash && dp->v_type != VDIR) {
error = ENOTDIR;
goto bad2;
}
/*
* Check to see if the vnode has been mounted on;
@ -494,6 +477,24 @@ unionlookup:
ndp->ni_vp = dp = tdp;
}
/*
* Check for symbolic link
*/
if ((dp->v_type == VLNK) &&
((cnp->cn_flags & FOLLOW) || trailing_slash ||
*ndp->ni_next == '/')) {
cnp->cn_flags |= ISSYMLINK;
return (0);
}
/*
* Check for bogus trailing slashes.
*/
if (trailing_slash && dp->v_type != VDIR) {
error = ENOTDIR;
goto bad2;
}
nextname:
/*
* Not a symbolic link. If more pathname,

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_bio.c 8.5 (Berkeley) 1/4/94
* $Id: nfs_bio.c,v 1.15 1995/06/27 11:06:34 dfr Exp $
* $Id: nfs_bio.c,v 1.16 1995/07/07 11:01:30 dfr Exp $
*/
#include <sys/param.h>
@ -125,7 +125,7 @@ nfs_bioread(vp, uio, ioflag, cred)
* 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 (vp->v_type != VREG) {
if (vp->v_type != VDIR)

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_subs.c 8.3 (Berkeley) 1/4/94
* $Id: nfs_subs.c,v 1.21 1995/07/20 09:43:12 davidg Exp $
* $Id: nfs_subs.c,v 1.22 1995/07/29 11:42:22 bde Exp $
*/
/*
@ -1243,7 +1243,7 @@ nfs_loadattrcache(vpp, mdp, dposp, vaper)
* information.
*/
np = VTONFS(vp);
if (vp->v_type == VNON) {
if (vp->v_type != vtyp) {
/*
* If we had a lock and it turns out that the vnode
* is an object which we don't want to lock (e.g. VDIR)

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_subs.c 8.3 (Berkeley) 1/4/94
* $Id: nfs_subs.c,v 1.21 1995/07/20 09:43:12 davidg Exp $
* $Id: nfs_subs.c,v 1.22 1995/07/29 11:42:22 bde Exp $
*/
/*
@ -1243,7 +1243,7 @@ nfs_loadattrcache(vpp, mdp, dposp, vaper)
* information.
*/
np = VTONFS(vp);
if (vp->v_type == VNON) {
if (vp->v_type != vtyp) {
/*
* If we had a lock and it turns out that the vnode
* is an object which we don't want to lock (e.g. VDIR)

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_vfsops.c 8.3 (Berkeley) 1/4/94
* $Id: nfs_vfsops.c,v 1.17 1995/07/07 11:01:31 dfr Exp $
* $Id: nfs_vfsops.c,v 1.18 1995/08/11 11:31:12 davidg Exp $
*/
#include <sys/param.h>
@ -538,6 +538,7 @@ mountnfs(argp, mp, nam, pth, hst, vpp)
register struct nfsmount *nmp;
struct nfsnode *np;
int error, maxio;
struct vattr attrs;
if (mp->mnt_flag & MNT_UPDATE) {
nmp = VFSTONFS(mp);
@ -688,6 +689,12 @@ mountnfs(argp, mp, nam, pth, hst, vpp)
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);
/*
* Lose the lock but keep the ref.
*/
@ -797,7 +804,6 @@ nfs_root(mp, vpp)
return (error);
vp = NFSTOV(np);
VOP_UNLOCK(vp);
vp->v_type = VDIR;
vp->v_flag = VROOT;
*vpp = vp;
return (0);

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_bio.c 8.5 (Berkeley) 1/4/94
* $Id: nfs_bio.c,v 1.15 1995/06/27 11:06:34 dfr Exp $
* $Id: nfs_bio.c,v 1.16 1995/07/07 11:01:30 dfr Exp $
*/
#include <sys/param.h>
@ -125,7 +125,7 @@ nfs_bioread(vp, uio, ioflag, cred)
* 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 (vp->v_type != VREG) {
if (vp->v_type != VDIR)

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_subs.c 8.3 (Berkeley) 1/4/94
* $Id: nfs_subs.c,v 1.21 1995/07/20 09:43:12 davidg Exp $
* $Id: nfs_subs.c,v 1.22 1995/07/29 11:42:22 bde Exp $
*/
/*
@ -1243,7 +1243,7 @@ nfs_loadattrcache(vpp, mdp, dposp, vaper)
* information.
*/
np = VTONFS(vp);
if (vp->v_type == VNON) {
if (vp->v_type != vtyp) {
/*
* If we had a lock and it turns out that the vnode
* is an object which we don't want to lock (e.g. VDIR)

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_vfsops.c 8.3 (Berkeley) 1/4/94
* $Id: nfs_vfsops.c,v 1.17 1995/07/07 11:01:31 dfr Exp $
* $Id: nfs_vfsops.c,v 1.18 1995/08/11 11:31:12 davidg Exp $
*/
#include <sys/param.h>
@ -538,6 +538,7 @@ mountnfs(argp, mp, nam, pth, hst, vpp)
register struct nfsmount *nmp;
struct nfsnode *np;
int error, maxio;
struct vattr attrs;
if (mp->mnt_flag & MNT_UPDATE) {
nmp = VFSTONFS(mp);
@ -688,6 +689,12 @@ mountnfs(argp, mp, nam, pth, hst, vpp)
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);
/*
* Lose the lock but keep the ref.
*/
@ -797,7 +804,6 @@ nfs_root(mp, vpp)
return (error);
vp = NFSTOV(np);
VOP_UNLOCK(vp);
vp->v_type = VDIR;
vp->v_flag = VROOT;
*vpp = vp;
return (0);

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_subs.c 8.3 (Berkeley) 1/4/94
* $Id: nfs_subs.c,v 1.21 1995/07/20 09:43:12 davidg Exp $
* $Id: nfs_subs.c,v 1.22 1995/07/29 11:42:22 bde Exp $
*/
/*
@ -1243,7 +1243,7 @@ nfs_loadattrcache(vpp, mdp, dposp, vaper)
* information.
*/
np = VTONFS(vp);
if (vp->v_type == VNON) {
if (vp->v_type != vtyp) {
/*
* If we had a lock and it turns out that the vnode
* is an object which we don't want to lock (e.g. VDIR)