SCCS-vsn: sys/vax/vax/machdep.c 6.25
SCCS-vsn: sys/kern/vfs_lookup.c 6.27
SCCS-vsn: sys/ufs/ffs/ufs_lookup.c 6.27
SCCS-vsn: sys/ufs/ufs/ufs_lookup.c 6.27
union nchash {
union nchash *nch_head[2];
union nchash {
union nchash *nch_head[2];
- struct nch *nch_chain[2];
+ struct namecache *nch_chain[2];
} nchash[NCHHASH];
#define nch_forw nch_chain[0]
#define nch_back nch_chain[1]
} nchash[NCHHASH];
#define nch_forw nch_chain[0]
#define nch_back nch_chain[1]
-struct nch *nchhead, **nchtail; /* LRU chain pointers */
+struct namecache *nchhead, **nchtail; /* LRU chain pointers */
struct nchstats nchstats; /* cache effectiveness statistics */
/*
struct nchstats nchstats; /* cache effectiveness statistics */
/*
register char *cp; /* pointer into pathname argument */
/* these variables refer to things which must be freed or unlocked */
register struct inode *dp = 0; /* the directory we are searching */
register char *cp; /* pointer into pathname argument */
/* these variables refer to things which must be freed or unlocked */
register struct inode *dp = 0; /* the directory we are searching */
- register struct nch *ncp; /* cache slot for entry */
+ register struct namecache *ncp; /* cache slot for entry */
register struct fs *fs; /* file system that directory is in */
register struct buf *bp = 0; /* a buffer of directory entries */
register struct direct *ep; /* the current directory entry */
register struct fs *fs; /* file system that directory is in */
register struct buf *bp = 0; /* a buffer of directory entries */
register struct direct *ep; /* the current directory entry */
makeentry = 0;
} else {
nhp = &nchash[NHASH(hash, dp->i_number, dp->i_dev)];
makeentry = 0;
} else {
nhp = &nchash[NHASH(hash, dp->i_number, dp->i_dev)];
- for (ncp = nhp->nch_forw; ncp != (struct nch *)nhp;
+ for (ncp = nhp->nch_forw; ncp != (struct namecache *)nhp;
ncp = ncp->nc_forw) {
if (ncp->nc_ino == dp->i_number &&
ncp->nc_dev == dp->i_dev &&
ncp = ncp->nc_forw) {
if (ncp->nc_ino == dp->i_number &&
ncp->nc_dev == dp->i_dev &&
(unsigned)ncp->nc_nlen))
break;
}
(unsigned)ncp->nc_nlen))
break;
}
- if (ncp == (struct nch *)nhp) {
+ if (ncp == (struct namecache *)nhp) {
nchstats.ncs_miss++;
ncp = NULL;
} else {
nchstats.ncs_miss++;
ncp = NULL;
} else {
- if (ncp->nc_id != ncp->nc_ip->i_id) {
+ if (ncp->nc_id != ncp->nc_ip->i_id)
nchstats.ncs_falsehits++;
nchstats.ncs_falsehits++;
- } else if (!makeentry) {
/*
* move this slot to end of LRU
* chain, if not already there
/*
* move this slot to end of LRU
* chain, if not already there
dp = ncp->nc_ip;
if (dp == NULL)
panic("nami: null cache ino");
dp = ncp->nc_ip;
if (dp == NULL)
panic("nami: null cache ino");
IUNLOCK(pdp);
igrab(dp);
} else {
IUNLOCK(pdp);
igrab(dp);
} else {
nchinit()
{
register union nchash *nchp;
nchinit()
{
register union nchash *nchp;
- register struct nch *ncp;
+ register struct namecache *ncp;
nchhead = 0;
nchtail = &nchhead;
nchhead = 0;
nchtail = &nchhead;
- for (ncp = nch; ncp < &nch[nchsize]; ncp++) {
+ for (ncp = namecache; ncp < &namecache[nchsize]; ncp++) {
ncp->nc_forw = ncp; /* hash chain */
ncp->nc_back = ncp;
ncp->nc_nxt = NULL; /* lru chain */
ncp->nc_forw = ncp; /* hash chain */
ncp->nc_back = ncp;
ncp->nc_nxt = NULL; /* lru chain */
nchinval(dev)
register dev_t dev;
{
nchinval(dev)
register dev_t dev;
{
- register struct nch *ncp, *nxtcp;
+ register struct namecache *ncp, *nxtcp;
for (ncp = nchhead; ncp; ncp = nxtcp) {
nxtcp = ncp->nc_nxt;
for (ncp = nchhead; ncp; ncp = nxtcp) {
nxtcp = ncp->nc_nxt;
- register struct nch *ncp;
+ register struct namecache *ncp;
- for (ncp = nch; ncp < &nch[nchsize]; ncp++)
+ for (ncp = namecache; ncp < &namecache[nchsize]; ncp++)
union nchash {
union nchash *nch_head[2];
union nchash {
union nchash *nch_head[2];
- struct nch *nch_chain[2];
+ struct namecache *nch_chain[2];
} nchash[NCHHASH];
#define nch_forw nch_chain[0]
#define nch_back nch_chain[1]
} nchash[NCHHASH];
#define nch_forw nch_chain[0]
#define nch_back nch_chain[1]
-struct nch *nchhead, **nchtail; /* LRU chain pointers */
+struct namecache *nchhead, **nchtail; /* LRU chain pointers */
struct nchstats nchstats; /* cache effectiveness statistics */
/*
struct nchstats nchstats; /* cache effectiveness statistics */
/*
register char *cp; /* pointer into pathname argument */
/* these variables refer to things which must be freed or unlocked */
register struct inode *dp = 0; /* the directory we are searching */
register char *cp; /* pointer into pathname argument */
/* these variables refer to things which must be freed or unlocked */
register struct inode *dp = 0; /* the directory we are searching */
- register struct nch *ncp; /* cache slot for entry */
+ register struct namecache *ncp; /* cache slot for entry */
register struct fs *fs; /* file system that directory is in */
register struct buf *bp = 0; /* a buffer of directory entries */
register struct direct *ep; /* the current directory entry */
register struct fs *fs; /* file system that directory is in */
register struct buf *bp = 0; /* a buffer of directory entries */
register struct direct *ep; /* the current directory entry */
makeentry = 0;
} else {
nhp = &nchash[NHASH(hash, dp->i_number, dp->i_dev)];
makeentry = 0;
} else {
nhp = &nchash[NHASH(hash, dp->i_number, dp->i_dev)];
- for (ncp = nhp->nch_forw; ncp != (struct nch *)nhp;
+ for (ncp = nhp->nch_forw; ncp != (struct namecache *)nhp;
ncp = ncp->nc_forw) {
if (ncp->nc_ino == dp->i_number &&
ncp->nc_dev == dp->i_dev &&
ncp = ncp->nc_forw) {
if (ncp->nc_ino == dp->i_number &&
ncp->nc_dev == dp->i_dev &&
(unsigned)ncp->nc_nlen))
break;
}
(unsigned)ncp->nc_nlen))
break;
}
- if (ncp == (struct nch *)nhp) {
+ if (ncp == (struct namecache *)nhp) {
nchstats.ncs_miss++;
ncp = NULL;
} else {
nchstats.ncs_miss++;
ncp = NULL;
} else {
- if (ncp->nc_id != ncp->nc_ip->i_id) {
+ if (ncp->nc_id != ncp->nc_ip->i_id)
nchstats.ncs_falsehits++;
nchstats.ncs_falsehits++;
- } else if (!makeentry) {
/*
* move this slot to end of LRU
* chain, if not already there
/*
* move this slot to end of LRU
* chain, if not already there
dp = ncp->nc_ip;
if (dp == NULL)
panic("nami: null cache ino");
dp = ncp->nc_ip;
if (dp == NULL)
panic("nami: null cache ino");
IUNLOCK(pdp);
igrab(dp);
} else {
IUNLOCK(pdp);
igrab(dp);
} else {
nchinit()
{
register union nchash *nchp;
nchinit()
{
register union nchash *nchp;
- register struct nch *ncp;
+ register struct namecache *ncp;
nchhead = 0;
nchtail = &nchhead;
nchhead = 0;
nchtail = &nchhead;
- for (ncp = nch; ncp < &nch[nchsize]; ncp++) {
+ for (ncp = namecache; ncp < &namecache[nchsize]; ncp++) {
ncp->nc_forw = ncp; /* hash chain */
ncp->nc_back = ncp;
ncp->nc_nxt = NULL; /* lru chain */
ncp->nc_forw = ncp; /* hash chain */
ncp->nc_back = ncp;
ncp->nc_nxt = NULL; /* lru chain */
nchinval(dev)
register dev_t dev;
{
nchinval(dev)
register dev_t dev;
{
- register struct nch *ncp, *nxtcp;
+ register struct namecache *ncp, *nxtcp;
for (ncp = nchhead; ncp; ncp = nxtcp) {
nxtcp = ncp->nc_nxt;
for (ncp = nchhead; ncp; ncp = nxtcp) {
nxtcp = ncp->nc_nxt;
- register struct nch *ncp;
+ register struct namecache *ncp;
- for (ncp = nch; ncp < &nch[nchsize]; ncp++)
+ for (ncp = namecache; ncp < &namecache[nchsize]; ncp++)
union nchash {
union nchash *nch_head[2];
union nchash {
union nchash *nch_head[2];
- struct nch *nch_chain[2];
+ struct namecache *nch_chain[2];
} nchash[NCHHASH];
#define nch_forw nch_chain[0]
#define nch_back nch_chain[1]
} nchash[NCHHASH];
#define nch_forw nch_chain[0]
#define nch_back nch_chain[1]
-struct nch *nchhead, **nchtail; /* LRU chain pointers */
+struct namecache *nchhead, **nchtail; /* LRU chain pointers */
struct nchstats nchstats; /* cache effectiveness statistics */
/*
struct nchstats nchstats; /* cache effectiveness statistics */
/*
register char *cp; /* pointer into pathname argument */
/* these variables refer to things which must be freed or unlocked */
register struct inode *dp = 0; /* the directory we are searching */
register char *cp; /* pointer into pathname argument */
/* these variables refer to things which must be freed or unlocked */
register struct inode *dp = 0; /* the directory we are searching */
- register struct nch *ncp; /* cache slot for entry */
+ register struct namecache *ncp; /* cache slot for entry */
register struct fs *fs; /* file system that directory is in */
register struct buf *bp = 0; /* a buffer of directory entries */
register struct direct *ep; /* the current directory entry */
register struct fs *fs; /* file system that directory is in */
register struct buf *bp = 0; /* a buffer of directory entries */
register struct direct *ep; /* the current directory entry */
makeentry = 0;
} else {
nhp = &nchash[NHASH(hash, dp->i_number, dp->i_dev)];
makeentry = 0;
} else {
nhp = &nchash[NHASH(hash, dp->i_number, dp->i_dev)];
- for (ncp = nhp->nch_forw; ncp != (struct nch *)nhp;
+ for (ncp = nhp->nch_forw; ncp != (struct namecache *)nhp;
ncp = ncp->nc_forw) {
if (ncp->nc_ino == dp->i_number &&
ncp->nc_dev == dp->i_dev &&
ncp = ncp->nc_forw) {
if (ncp->nc_ino == dp->i_number &&
ncp->nc_dev == dp->i_dev &&
(unsigned)ncp->nc_nlen))
break;
}
(unsigned)ncp->nc_nlen))
break;
}
- if (ncp == (struct nch *)nhp) {
+ if (ncp == (struct namecache *)nhp) {
nchstats.ncs_miss++;
ncp = NULL;
} else {
nchstats.ncs_miss++;
ncp = NULL;
} else {
- if (ncp->nc_id != ncp->nc_ip->i_id) {
+ if (ncp->nc_id != ncp->nc_ip->i_id)
nchstats.ncs_falsehits++;
nchstats.ncs_falsehits++;
- } else if (!makeentry) {
/*
* move this slot to end of LRU
* chain, if not already there
/*
* move this slot to end of LRU
* chain, if not already there
dp = ncp->nc_ip;
if (dp == NULL)
panic("nami: null cache ino");
dp = ncp->nc_ip;
if (dp == NULL)
panic("nami: null cache ino");
IUNLOCK(pdp);
igrab(dp);
} else {
IUNLOCK(pdp);
igrab(dp);
} else {
nchinit()
{
register union nchash *nchp;
nchinit()
{
register union nchash *nchp;
- register struct nch *ncp;
+ register struct namecache *ncp;
nchhead = 0;
nchtail = &nchhead;
nchhead = 0;
nchtail = &nchhead;
- for (ncp = nch; ncp < &nch[nchsize]; ncp++) {
+ for (ncp = namecache; ncp < &namecache[nchsize]; ncp++) {
ncp->nc_forw = ncp; /* hash chain */
ncp->nc_back = ncp;
ncp->nc_nxt = NULL; /* lru chain */
ncp->nc_forw = ncp; /* hash chain */
ncp->nc_back = ncp;
ncp->nc_nxt = NULL; /* lru chain */
nchinval(dev)
register dev_t dev;
{
nchinval(dev)
register dev_t dev;
{
- register struct nch *ncp, *nxtcp;
+ register struct namecache *ncp, *nxtcp;
for (ncp = nchhead; ncp; ncp = nxtcp) {
nxtcp = ncp->nc_nxt;
for (ncp = nchhead; ncp; ncp = nxtcp) {
nxtcp = ncp->nc_nxt;
- register struct nch *ncp;
+ register struct namecache *ncp;
- for (ncp = nch; ncp < &nch[nchsize]; ncp++)
+ for (ncp = namecache; ncp < &namecache[nchsize]; ncp++)
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)machdep.c 6.24 (Berkeley) %G%
+ * @(#)machdep.c 6.25 (Berkeley) %G%
valloc(argmap, struct map, ARGMAPSIZE);
valloc(kernelmap, struct map, nproc);
valloc(mbmap, struct map, nmbclusters/4);
valloc(argmap, struct map, ARGMAPSIZE);
valloc(kernelmap, struct map, nproc);
valloc(mbmap, struct map, nmbclusters/4);
- valloc(nch, struct nch, nchsize);
+ valloc(namecache, struct namecache, nchsize);
#ifdef QUOTA
valloclim(quota, struct quota, nquota, quotaNQUOTA);
valloclim(dquot, struct dquot, ndquot, dquotNDQUOT);
#ifdef QUOTA
valloclim(quota, struct quota, nquota, quotaNQUOTA);
valloclim(dquot, struct dquot, ndquot, dquotNDQUOT);