-struct hfsnode {
- LIST_ENTRY(hfsnode) h_hash; /* links on valid files */
- CIRCLEQ_ENTRY(hfsnode) h_sibling; /* links on siblings */
- struct lock__bsd__ h_lock; /* node lock. */
- union {
- struct hfslockf *hu_lockf; /* Head of byte-level lock list. */
- void *hu_sysdata; /* private data for system files */
- char hu_symlinkdata[4]; /* symbolic link (4 chars or less) */
- char *hu_symlinkptr; /* symbolic link pathname */
- } h_un;
- struct vnode * h_vp; /* vnode associated with this inode. */
- struct hfsfilemeta * h_meta; /* Ptr to file meta data */
- u_int16_t h_nodeflags; /* flags, see below */
- u_int8_t h_type; /* Type of info: dir, data, rsrc */
- int8_t fcbFlags; /* FCB flags */
- struct rl_head h_invalidranges;/* Areas of disk that should read back as zeroes */
- u_int64_t fcbEOF; /* Logical length or EOF in bytes */
- u_int64_t fcbPLen; /* Physical file length in bytes */
- u_int32_t fcbClmpSize; /* Number of bytes per clump */
- HFSPlusExtentRecord fcbExtents; /* Extents of file */
-
-#if HFS_DIAGNOSTIC
- u_int32_t h_valid; /* is the vnode reference valid */
-#endif
-};
-#define h_lockf h_un.hu_lockf
-#define fcbBTCBPtr h_un.hu_sysdata
-#define h_symlinkptr h_un.hu_symlinkptr
-#define h_symlinkdata h_un.hu_symlinkdata
-
-typedef struct hfsnode FCB;
-
-
-typedef struct hfsfilemeta {
- struct siblinghead h_siblinghead; /* Head of the sibling list */
- simple_lock_data_t h_siblinglock; /* sibling list lock. */
- u_int32_t h_metaflags; /* IN_LONGNAME, etc */
- struct vnode *h_devvp; /* vnode for block I/O. */
-
- dev_t h_dev; /* Device associated with the inode. */
- u_int32_t h_nodeID; /* specific id of this node */
- u_int32_t h_dirID; /* Parent Directory ID */
- u_int32_t h_hint; /* Catalog hint */
-
- off_t h_size; /* Total physical size of object */
- u_int16_t h_usecount; /* How many siblings */
- u_int16_t h_mode; /* IFMT, permissions; see below. */
- u_int32_t h_pflags; /* Permission flags (NODUMP, IMMUTABLE, APPEND etc.) */
- u_int32_t h_uid; /* File owner. */
- u_int32_t h_gid; /* File group. */
- union {
- dev_t hu_rdev; /* Special device info for this node */
- u_int32_t hu_indnodeno; /* internal indirect node number (never exported) */
- } h_spun;
- u_int32_t h_crtime; /* BSD-format creation date in secs. */
- u_int32_t h_atime; /* BSD-format access date in secs. */
- u_int32_t h_mtime; /* BSD-format mod date in seconds */
- u_int32_t h_ctime; /* BSD-format status change date */
- u_int32_t h_butime; /* BSD-format last backup date in secs. */
- u_int16_t h_nlink; /* link count (aprox. for dirs) */
- u_short h_namelen; /* Length of name string */
- char * h_namePtr; /* Points the name of the file */
- FileNameStr h_fileName; /* CName of file */
-} hfsfilemeta;
-#define h_rdev h_spun.hu_rdev
-#define h_indnodeno h_spun.hu_indnodeno
-
-#define H_EXTENDSIZE(VP,BYTES) ((VP)->h_meta->h_size += (BYTES))
-#define H_TRUNCSIZE(VP,BYTES) ((VP)->h_meta->h_size -= (BYTES))