diff options
author | green <green@FreeBSD.org> | 2000-04-22 03:44:00 +0000 |
---|---|---|
committer | green <green@FreeBSD.org> | 2000-04-22 03:44:00 +0000 |
commit | ceecd18663bf96e4035f579bb44400dfa4b3f99f (patch) | |
tree | 64be21b928684a2093730847145ea6db6e278f95 | |
parent | e9122c336927f6e474ed1423d96a632d3f0dfe82 (diff) | |
download | FreeBSD-src-ceecd18663bf96e4035f579bb44400dfa4b3f99f.zip FreeBSD-src-ceecd18663bf96e4035f579bb44400dfa4b3f99f.tar.gz |
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 :-/
-rw-r--r-- | sys/kern/vfs_cache.c | 16 | ||||
-rw-r--r-- | sys/sys/vnode.h | 19 |
2 files changed, 18 insertions, 17 deletions
diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 33462b1..f9d3e13 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -50,22 +50,6 @@ #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: * * Names found by directory scans are retained in a cache diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 4053270..38cddb9 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -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. |