Move the declaration of "struct namecache" to vnode.h, as it can be useful

elsewhere.  Note, of course, that in an ideal world nothing should need
to see our VFS implementation :-/
This commit is contained in:
green 2000-04-22 03:44:00 +00:00
parent 8b90a7883c
commit 7b6ed60e6f
2 changed files with 18 additions and 17 deletions

View File

@ -49,22 +49,6 @@
#include <sys/proc.h>
#include <sys/filedesc.h>
/*
* This structure describes the elements in the cache of recent
* names looked up by namei.
*/
struct namecache {
LIST_ENTRY(namecache) nc_hash; /* hash chain */
LIST_ENTRY(namecache) nc_src; /* source vnode list */
TAILQ_ENTRY(namecache) nc_dst; /* destination vnode list */
struct vnode *nc_dvp; /* vnode of parent of name */
struct vnode *nc_vp; /* vnode the name refers to */
u_char nc_flag; /* flag bits */
u_char nc_nlen; /* length of name */
char nc_name[0]; /* segment name */
};
/*
* Name caching works as follows:
*

View File

@ -74,7 +74,24 @@ enum vtagtype {
TAILQ_HEAD(buflists, buf);
typedef int vop_t __P((void *));
struct namecache;
/*
* This structure describes the elements in the cache of recent
* names looked up by namei.
*/
struct vnode;
struct namecache {
LIST_ENTRY(namecache) nc_hash; /* hash chain */
LIST_ENTRY(namecache) nc_src; /* source vnode list */
TAILQ_ENTRY(namecache) nc_dst; /* destination vnode list */
struct vnode *nc_dvp; /* vnode of parent of name */
struct vnode *nc_vp; /* vnode the name refers to */
u_char nc_flag; /* flag bits */
u_char nc_nlen; /* length of name */
char nc_name[0]; /* segment name */
};
/*
* Reading or writing any of these items requires holding the appropriate lock.