Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/vnode.h
Show First 20 Lines • Show All 141 Lines • ▼ Show 20 Lines | struct vnode { | ||||
*/ | */ | ||||
struct lock v_lock; /* u (if fs don't have one) */ | struct lock v_lock; /* u (if fs don't have one) */ | ||||
struct mtx v_interlock; /* lock for "i" things */ | struct mtx v_interlock; /* lock for "i" things */ | ||||
struct lock *v_vnlock; /* u pointer to vnode lock */ | struct lock *v_vnlock; /* u pointer to vnode lock */ | ||||
/* | /* | ||||
* The machinery of being a vnode | * The machinery of being a vnode | ||||
*/ | */ | ||||
TAILQ_ENTRY(vnode) v_actfreelist; /* l vnode active/free lists */ | TAILQ_ENTRY(vnode) v_vnodelist; /* l vnode lists */ | ||||
TAILQ_ENTRY(vnode) v_dirtylist; /* l vnode dirty list */ | TAILQ_ENTRY(vnode) v_dirtylist; /* l vnode dirty list */ | ||||
struct bufobj v_bufobj; /* * Buffer cache object */ | struct bufobj v_bufobj; /* * Buffer cache object */ | ||||
/* | /* | ||||
* Hooks for various subsystems and features. | * Hooks for various subsystems and features. | ||||
*/ | */ | ||||
struct vpollinfo *v_pollinfo; /* i Poll events, p for *v_pi */ | struct vpollinfo *v_pollinfo; /* i Poll events, p for *v_pi */ | ||||
struct label *v_label; /* MAC label for vnode */ | struct label *v_label; /* MAC label for vnode */ | ||||
▲ Show 20 Lines • Show All 76 Lines • ▼ Show 20 Lines | |||||
* | * | ||||
* VIRF_DOOMED is doubly protected by the interlock and vnode lock. Both | * VIRF_DOOMED is doubly protected by the interlock and vnode lock. Both | ||||
* are required for writing but the status may be checked with either. | * are required for writing but the status may be checked with either. | ||||
*/ | */ | ||||
#define VIRF_DOOMED 0x0001 /* This vnode is being recycled */ | #define VIRF_DOOMED 0x0001 /* This vnode is being recycled */ | ||||
#define VI_TEXT_REF 0x0001 /* Text ref grabbed use ref */ | #define VI_TEXT_REF 0x0001 /* Text ref grabbed use ref */ | ||||
#define VI_MOUNT 0x0020 /* Mount in progress */ | #define VI_MOUNT 0x0020 /* Mount in progress */ | ||||
#define VI_FREE 0x0100 /* This vnode is on the freelist */ | |||||
#define VI_ACTIVE 0x0200 /* This vnode is on the active list */ | |||||
#define VI_DOINGINACT 0x0800 /* VOP_INACTIVE is in progress */ | #define VI_DOINGINACT 0x0800 /* VOP_INACTIVE is in progress */ | ||||
#define VI_OWEINACT 0x1000 /* Need to call inactive */ | #define VI_OWEINACT 0x1000 /* Need to call inactive */ | ||||
#define VI_DEFINACT 0x2000 /* deferred inactive */ | #define VI_DEFINACT 0x2000 /* deferred inactive */ | ||||
#define VV_ROOT 0x0001 /* root of its filesystem */ | #define VV_ROOT 0x0001 /* root of its filesystem */ | ||||
#define VV_ISTTY 0x0002 /* vnode represents a tty */ | #define VV_ISTTY 0x0002 /* vnode represents a tty */ | ||||
#define VV_NOSYNC 0x0004 /* unlinked, stop syncing */ | #define VV_NOSYNC 0x0004 /* unlinked, stop syncing */ | ||||
#define VV_ETERNALDEV 0x0008 /* device that is never destroyed */ | #define VV_ETERNALDEV 0x0008 /* device that is never destroyed */ | ||||
#define VV_CACHEDLABEL 0x0010 /* Vnode has valid cached MAC label */ | #define VV_CACHEDLABEL 0x0010 /* Vnode has valid cached MAC label */ | ||||
#define VV_VMSIZEVNLOCK 0x0020 /* object size check requires vnode lock */ | #define VV_VMSIZEVNLOCK 0x0020 /* object size check requires vnode lock */ | ||||
#define VV_COPYONWRITE 0x0040 /* vnode is doing copy-on-write */ | #define VV_COPYONWRITE 0x0040 /* vnode is doing copy-on-write */ | ||||
#define VV_SYSTEM 0x0080 /* vnode being used by kernel */ | #define VV_SYSTEM 0x0080 /* vnode being used by kernel */ | ||||
#define VV_PROCDEP 0x0100 /* vnode is process dependent */ | #define VV_PROCDEP 0x0100 /* vnode is process dependent */ | ||||
#define VV_NOKNOTE 0x0200 /* don't activate knotes on this vnode */ | #define VV_NOKNOTE 0x0200 /* don't activate knotes on this vnode */ | ||||
#define VV_DELETED 0x0400 /* should be removed */ | #define VV_DELETED 0x0400 /* should be removed */ | ||||
#define VV_MD 0x0800 /* vnode backs the md device */ | #define VV_MD 0x0800 /* vnode backs the md device */ | ||||
#define VV_FORCEINSMQ 0x1000 /* force the insmntque to succeed */ | #define VV_FORCEINSMQ 0x1000 /* force the insmntque to succeed */ | ||||
#define VV_READLINK 0x2000 /* fdescfs linux vnode */ | #define VV_READLINK 0x2000 /* fdescfs linux vnode */ | ||||
#define VMP_TMPMNTFREELIST 0x0001 /* Vnode is on mnt's tmp free list */ | #define VMP_DIRTYLIST 0x0001 /* Vnode is on mnt's dirty list */ | ||||
#define VMP_DIRTYLIST 0x0002 /* Vnode is on mnt's dirty free list */ | |||||
/* | /* | ||||
* Vnode attributes. A field value of VNOVAL represents a field whose value | * Vnode attributes. A field value of VNOVAL represents a field whose value | ||||
* is unavailable (getattr) or which is not to be changed (setattr). | * is unavailable (getattr) or which is not to be changed (setattr). | ||||
*/ | */ | ||||
struct vattr { | struct vattr { | ||||
enum vtype va_type; /* vnode type (for create) */ | enum vtype va_type; /* vnode type (for create) */ | ||||
u_short va_mode; /* files access mode and type */ | u_short va_mode; /* files access mode and type */ | ||||
▲ Show 20 Lines • Show All 697 Lines • Show Last 20 Lines |