Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/vnode.h
Show First 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | |||||
* unique vnode allocated for each active file, each current directory, | * unique vnode allocated for each active file, each current directory, | ||||
* each mounted-on file, text file, and the root. | * each mounted-on file, text file, and the root. | ||||
*/ | */ | ||||
/* | /* | ||||
* Vnode types. VNON means no type. | * Vnode types. VNON means no type. | ||||
*/ | */ | ||||
enum vtype { VNON, VREG, VDIR, VBLK, VCHR, VLNK, VSOCK, VFIFO, VBAD, | enum vtype { VNON, VREG, VDIR, VBLK, VCHR, VLNK, VSOCK, VFIFO, VBAD, | ||||
VMARKER }; | VMARKER, VDOOR}; | ||||
enum vgetstate { VGET_NONE, VGET_HOLDCNT, VGET_USECOUNT }; | enum vgetstate { VGET_NONE, VGET_HOLDCNT, VGET_USECOUNT }; | ||||
/* | /* | ||||
* Each underlying filesystem allocates its own private area and hangs | * Each underlying filesystem allocates its own private area and hangs | ||||
* it from v_data. If non-null, this area is freed in getnewvnode(). | * it from v_data. If non-null, this area is freed in getnewvnode(). | ||||
*/ | */ | ||||
struct namecache; | struct namecache; | ||||
struct cache_fpl; | struct cache_fpl; | ||||
struct door_vnode_info; | |||||
struct vpollinfo { | struct vpollinfo { | ||||
struct mtx vpi_lock; /* lock to protect below */ | struct mtx vpi_lock; /* lock to protect below */ | ||||
struct selinfo vpi_selinfo; /* identity of poller(s) */ | struct selinfo vpi_selinfo; /* identity of poller(s) */ | ||||
short vpi_events; /* what they are looking for */ | short vpi_events; /* what they are looking for */ | ||||
short vpi_revents; /* what has happened */ | short vpi_revents; /* what has happened */ | ||||
}; | }; | ||||
▲ Show 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | struct vnode { | ||||
/* | /* | ||||
* Type specific fields, only one applies to any given vnode. | * Type specific fields, only one applies to any given vnode. | ||||
*/ | */ | ||||
union { | union { | ||||
struct mount *v_mountedhere; /* v ptr to mountpoint (VDIR) */ | struct mount *v_mountedhere; /* v ptr to mountpoint (VDIR) */ | ||||
struct unpcb *v_unpcb; /* v unix domain net (VSOCK) */ | struct unpcb *v_unpcb; /* v unix domain net (VSOCK) */ | ||||
struct cdev *v_rdev; /* v device (VCHR, VBLK) */ | struct cdev *v_rdev; /* v device (VCHR, VBLK) */ | ||||
struct fifoinfo *v_fifoinfo; /* v fifo (VFIFO) */ | struct fifoinfo *v_fifoinfo; /* v fifo (VFIFO) */ | ||||
struct door_vnode_info *v_door_vnode_info; /* v ptr to attached door (VDOOR) */ | |||||
}; | }; | ||||
/* | /* | ||||
* vfs_hash: (mount + inode) -> vnode hash. The hash value | * vfs_hash: (mount + inode) -> vnode hash. The hash value | ||||
* itself is grouped with other int fields, to avoid padding. | * itself is grouped with other int fields, to avoid padding. | ||||
*/ | */ | ||||
LIST_ENTRY(vnode) v_hashlist; | LIST_ENTRY(vnode) v_hashlist; | ||||
▲ Show 20 Lines • Show All 1,021 Lines • Show Last 20 Lines |