summary |
tags |
clone url |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
5c2bded)
SCCS-vsn: sys/kern/vfs_lookup.c 6.30
SCCS-vsn: sys/ufs/ffs/ufs_lookup.c 6.30
SCCS-vsn: sys/ufs/ufs/ufs_lookup.c 6.30
* 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.
*
- * @(#)vfs_lookup.c 6.29 (Berkeley) %G%
+ * @(#)vfs_lookup.c 6.30 (Berkeley) %G%
if (!isdotdot || dp != u.u_rdir)
dp = ncp->nc_ip;
if (dp == NULL)
if (!isdotdot || dp != u.u_rdir)
dp = ncp->nc_ip;
if (dp == NULL)
- panic("nami: null cache ino");
+ panic("namei: null cache ino");
if (pdp == dp)
dp->i_count++;
else if (isdotdot) {
if (pdp == dp)
dp->i_count++;
else if (isdotdot) {
ndp->ni_offset = 0;
numdirpasses = 1;
} else {
ndp->ni_offset = 0;
numdirpasses = 1;
} else {
- if ((dp->i_flag & (ICHG|IMOD)) ||
- dp->i_ctime >= u.u_ncache.nc_time) {
- if (u.u_ncache.nc_prevoffset > dp->i_size)
- u.u_ncache.nc_prevoffset = 0;
- else
- u.u_ncache.nc_prevoffset &= ~(DIRBLKSIZ - 1);
- u.u_ncache.nc_time = time.tv_sec;
- }
+ if (u.u_ncache.nc_prevoffset > dp->i_size)
+ u.u_ncache.nc_prevoffset = 0;
ndp->ni_offset = u.u_ncache.nc_prevoffset;
entryoffsetinblock = blkoff(fs, ndp->ni_offset);
if (entryoffsetinblock != 0) {
ndp->ni_offset = u.u_ncache.nc_prevoffset;
entryoffsetinblock = blkoff(fs, ndp->ni_offset);
if (entryoffsetinblock != 0) {
* in the cache as to where the entry was found.
*/
if (*cp == '\0' && flag == LOOKUP) {
* in the cache as to where the entry was found.
*/
if (*cp == '\0' && flag == LOOKUP) {
- u.u_ncache.nc_prevoffset = ndp->ni_offset;
+ u.u_ncache.nc_prevoffset = ndp->ni_offset &~ (DIRBLKSIZ - 1);
u.u_ncache.nc_inumber = dp->i_number;
u.u_ncache.nc_dev = dp->i_dev;
u.u_ncache.nc_inumber = dp->i_number;
u.u_ncache.nc_dev = dp->i_dev;
- u.u_ncache.nc_time = time.tv_sec;
}
/*
* Save directory entry's inode number and reclen in ndp->ni_dent,
}
/*
* Save directory entry's inode number and reclen in ndp->ni_dent,
*/
if (makeentry) {
if (ncp != NULL)
*/
if (makeentry) {
if (ncp != NULL)
- panic("nami: duplicating cache");
+ panic("namei: duplicating cache");
/*
* Free the cache slot at head of lru chain.
*/
/*
* Free the cache slot at head of lru chain.
*/
* 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.
*
- * @(#)ufs_lookup.c 6.29 (Berkeley) %G%
+ * @(#)ufs_lookup.c 6.30 (Berkeley) %G%
if (!isdotdot || dp != u.u_rdir)
dp = ncp->nc_ip;
if (dp == NULL)
if (!isdotdot || dp != u.u_rdir)
dp = ncp->nc_ip;
if (dp == NULL)
- panic("nami: null cache ino");
+ panic("namei: null cache ino");
if (pdp == dp)
dp->i_count++;
else if (isdotdot) {
if (pdp == dp)
dp->i_count++;
else if (isdotdot) {
ndp->ni_offset = 0;
numdirpasses = 1;
} else {
ndp->ni_offset = 0;
numdirpasses = 1;
} else {
- if ((dp->i_flag & (ICHG|IMOD)) ||
- dp->i_ctime >= u.u_ncache.nc_time) {
- if (u.u_ncache.nc_prevoffset > dp->i_size)
- u.u_ncache.nc_prevoffset = 0;
- else
- u.u_ncache.nc_prevoffset &= ~(DIRBLKSIZ - 1);
- u.u_ncache.nc_time = time.tv_sec;
- }
+ if (u.u_ncache.nc_prevoffset > dp->i_size)
+ u.u_ncache.nc_prevoffset = 0;
ndp->ni_offset = u.u_ncache.nc_prevoffset;
entryoffsetinblock = blkoff(fs, ndp->ni_offset);
if (entryoffsetinblock != 0) {
ndp->ni_offset = u.u_ncache.nc_prevoffset;
entryoffsetinblock = blkoff(fs, ndp->ni_offset);
if (entryoffsetinblock != 0) {
* in the cache as to where the entry was found.
*/
if (*cp == '\0' && flag == LOOKUP) {
* in the cache as to where the entry was found.
*/
if (*cp == '\0' && flag == LOOKUP) {
- u.u_ncache.nc_prevoffset = ndp->ni_offset;
+ u.u_ncache.nc_prevoffset = ndp->ni_offset &~ (DIRBLKSIZ - 1);
u.u_ncache.nc_inumber = dp->i_number;
u.u_ncache.nc_dev = dp->i_dev;
u.u_ncache.nc_inumber = dp->i_number;
u.u_ncache.nc_dev = dp->i_dev;
- u.u_ncache.nc_time = time.tv_sec;
}
/*
* Save directory entry's inode number and reclen in ndp->ni_dent,
}
/*
* Save directory entry's inode number and reclen in ndp->ni_dent,
*/
if (makeentry) {
if (ncp != NULL)
*/
if (makeentry) {
if (ncp != NULL)
- panic("nami: duplicating cache");
+ panic("namei: duplicating cache");
/*
* Free the cache slot at head of lru chain.
*/
/*
* Free the cache slot at head of lru chain.
*/
* 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.
*
- * @(#)ufs_lookup.c 6.29 (Berkeley) %G%
+ * @(#)ufs_lookup.c 6.30 (Berkeley) %G%
if (!isdotdot || dp != u.u_rdir)
dp = ncp->nc_ip;
if (dp == NULL)
if (!isdotdot || dp != u.u_rdir)
dp = ncp->nc_ip;
if (dp == NULL)
- panic("nami: null cache ino");
+ panic("namei: null cache ino");
if (pdp == dp)
dp->i_count++;
else if (isdotdot) {
if (pdp == dp)
dp->i_count++;
else if (isdotdot) {
ndp->ni_offset = 0;
numdirpasses = 1;
} else {
ndp->ni_offset = 0;
numdirpasses = 1;
} else {
- if ((dp->i_flag & (ICHG|IMOD)) ||
- dp->i_ctime >= u.u_ncache.nc_time) {
- if (u.u_ncache.nc_prevoffset > dp->i_size)
- u.u_ncache.nc_prevoffset = 0;
- else
- u.u_ncache.nc_prevoffset &= ~(DIRBLKSIZ - 1);
- u.u_ncache.nc_time = time.tv_sec;
- }
+ if (u.u_ncache.nc_prevoffset > dp->i_size)
+ u.u_ncache.nc_prevoffset = 0;
ndp->ni_offset = u.u_ncache.nc_prevoffset;
entryoffsetinblock = blkoff(fs, ndp->ni_offset);
if (entryoffsetinblock != 0) {
ndp->ni_offset = u.u_ncache.nc_prevoffset;
entryoffsetinblock = blkoff(fs, ndp->ni_offset);
if (entryoffsetinblock != 0) {
* in the cache as to where the entry was found.
*/
if (*cp == '\0' && flag == LOOKUP) {
* in the cache as to where the entry was found.
*/
if (*cp == '\0' && flag == LOOKUP) {
- u.u_ncache.nc_prevoffset = ndp->ni_offset;
+ u.u_ncache.nc_prevoffset = ndp->ni_offset &~ (DIRBLKSIZ - 1);
u.u_ncache.nc_inumber = dp->i_number;
u.u_ncache.nc_dev = dp->i_dev;
u.u_ncache.nc_inumber = dp->i_number;
u.u_ncache.nc_dev = dp->i_dev;
- u.u_ncache.nc_time = time.tv_sec;
}
/*
* Save directory entry's inode number and reclen in ndp->ni_dent,
}
/*
* Save directory entry's inode number and reclen in ndp->ni_dent,
*/
if (makeentry) {
if (ncp != NULL)
*/
if (makeentry) {
if (ncp != NULL)
- panic("nami: duplicating cache");
+ panic("namei: duplicating cache");
/*
* Free the cache slot at head of lru chain.
*/
/*
* Free the cache slot at head of lru chain.
*/