+ u32 i_reparse_tag;
+
+ /* Number of dentries that reference this inode */
+ u32 i_nlink;
+
+ /* Alternate data stream entries. */
+ struct wim_ads_entry *i_ads_entries;
+
+ /* Inode number */
+ u64 i_ino;
+
+ /* List of dentries that reference this inode (there should be
+ * link_count of them) */
+ struct list_head i_dentry;
+
+ union {
+ struct hlist_node i_hlist;
+ struct list_head i_list;
+ };
+
+ union {
+ /* Used during image extraction to build a list of inodes that
+ * share a certain stream */
+ struct list_head i_lte_inode_list;
+
+ /* Device number, used only during image capture */
+ u64 i_devno;
+ };
+
+ tchar *i_extracted_file;
+
+ /* Root of a red-black tree storing the children of this inode (if
+ * non-empty, implies the inode is a directory, although that is also
+ * noted in the @attributes field.) */
+ struct rb_root i_children;
+
+ /* Next alternate data stream ID to be assigned */
+ u32 i_next_stream_id;
+
+#ifdef WITH_FUSE
+ /* wimfs file descriptors table for the inode */
+ u16 i_num_opened_fds;
+ u16 i_num_allocated_fds;
+ struct wimfs_fd **i_fds;
+ /* This mutex protects the inode's file descriptors table during
+ * read-only mounts. Read-write mounts are still restricted to 1
+ * thread. */
+ pthread_mutex_t i_mutex;
+#endif
+};
+
+#define inode_for_each_dentry(dentry, inode) \
+ list_for_each_entry((dentry), &(inode)->i_dentry, d_alias)
+
+#define inode_add_dentry(dentry, inode) \
+ list_add_tail(&(dentry)->d_alias, &(inode)->i_dentry)
+
+#define inode_first_dentry(inode) \
+ container_of(inode->i_dentry.next, struct wim_dentry, d_alias)
+
+static inline bool
+dentry_is_first_in_inode(const struct wim_dentry *dentry)
+{
+ return inode_first_dentry(dentry->d_inode) == dentry;
+}