Its time to split sys/vnode.h into sys/vnode.h and sys/vnode_impl.h. The latter holds implementation details about the vnode life cycle and must be included only from kern/vfs_*, miscfs/genfs/* and miscfs/specfs/*. It is sufficient to include vnode_impl.h, it already includes sys/vnode.h.
1) Rename the vcache node to vnode_impl: - Rename struct vcache_node to vnode_impl, start its fields with vi_. - Rename enum vcache_state to vnode_state, start its elements with VS_. - Rename macros VN_TO_VP and VP_TO_VN to VIMPL_TO_VNODE and VNODE_TO_VIMPL. - Add typedef struct vnode_impl vnode_impl_t. 2) The actual split: - Split sys/vnode.h into vnode.h and vnode_impl.h. - Move _VFS_VNODE_PRIVATE protected operations into vnode_impl.h. - Move struct vnode_impl definition and operations into vnode_impl.h. - Include vnode_impl.h where we include vnode.h with _VFS_VNODE_PRIVATE defined. - Get rid of _VFS_VNODE_PRIVATE. 3) Vnode printing: - Add a function to print the fields of a vnode including its implementation. - Use it from vprint() and vfs_vnode_print(). - Move vstate_name() to vfs_subr.c. The diffs are here: http://www.netbsd.org/~hannken/vrename/ Comments or objections anyone? -- J. Hannken-Illjes - hann...@eis.cs.tu-bs.de - TU Braunschweig (Germany)