- u_short i_rdlockc; /* count of locked readers on inode */
- u_short i_wrlockc; /* count of locked writers on inode */
- ino_t i_number; /* i number, 1-to-1 with device address */
- struct fs *i_fs; /* file sys associated with this inode */
- struct dquot *i_dquot; /* quota structure controlling this file */
- union {
- daddr_t if_lastr; /* last read (read-ahead) */
- struct socket *is_socket;
- struct {
- struct inode *if_freef; /* free list forward */
- struct inode **if_freeb; /* free list back */
- } i_fr;
- } i_un;
- struct icommon
- {
- u_short ic_mode; /* 0: mode and type of file */
- short ic_nlink; /* 2: number of links to file */
- short ic_uid; /* 4: owner's user id */
- short ic_gid; /* 6: owner's group id */
- off_t ic_size; /* 8: number of bytes in file */
- daddr_t ic_db[NDADDR]; /* 12: disk block addresses */
- daddr_t ic_ib[NIADDR]; /* 44: indirect blocks */
- time_t ic_atime; /* 52: time last accessed */
- time_t ic_mtime; /* 56: time last modified */
- time_t ic_ctime; /* 60: time created */
- } i_ic;
-};
-
-struct dinode {
- union {
- struct icommon di_icom;
- char di_size[64];
- } di_un;
+ short i_pad;
+ ino_t i_number; /* the identity of the inode */
+ union { /* associated filesystem */
+ struct fs *fs; /* FFS */
+ struct lfs *lfs; /* LFS */
+ } inode_u;
+#define i_fs inode_u.fs
+#define i_lfs inode_u.lfs
+ struct dquot *i_dquot[MAXQUOTAS]; /* pointer to dquot structures */
+ struct lockf *i_lockf; /* head of byte-level lock list */
+ u_quad_t i_modrev; /* revision level for lease */
+ pid_t i_lockholder; /* DEBUG: holder of inode lock */
+ pid_t i_lockwaiter; /* DEBUG: latest blocked for inode lock */
+ /*
+ * Side effects; used during directory lookup.
+ */
+ off_t i_endoff; /* end of useful stuff in directory */
+ long i_diroff; /* offset in dir, where we found last entry */
+ long i_offset; /* offset of free space in directory */
+ long i_count; /* size of free slot in directory */
+ ino_t i_ino; /* inode number of found directory */
+ u_long i_reclen; /* size of found directory entry */
+ /*
+ * the on-disk dinode itself.
+ */
+ struct dinode i_din; /* the on-disk dinode */
+ long i_spare[12]; /* spares to round up to 256 bytes */