- 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[MAXQUOTAS]; /* pointer to dquot strauctures */
- long i_diroff; /* offset in dir, where we found last entry */
- off_t i_endoff; /* end of useful stuff in directory */
- long i_spare0;
- long i_spare1;
- struct dinode i_din; /* the on-disk inode */
+ 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 */
+ u_quad_t i_modrev; /* revision level for lease */
+ struct lockf *i_lockf; /* head of byte-level lock list */
+ 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.
+ */
+ doff_t i_endoff; /* end of useful stuff in directory */
+ doff_t i_diroff; /* offset in dir, where we found last entry */
+ doff_t 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 */