+ u32 refcnt;
+
+ u32 full_path_utf8_len;
+
+ /* Pointer to the UTF-16 short filename (malloc()ed buffer) */
+ char *short_name;
+
+ /* Pointer to the UTF-16 filename (malloc()ed buffer). */
+ char *file_name;
+
+ /* Full path (UTF-8) to this dentry (malloc()ed buffer). */
+ char *full_path_utf8;
+};
+
+#define rbnode_dentry(node) container_of(node, struct dentry, rb_node)
+
+/*
+ * WIM inode.
+ *
+ * As mentioned above, in the WIM file that is no on-disk analogue of a real
+ * inode, as most of these fields are duplicated in the dentries.
+ */
+struct inode {
+ /* Timestamps for the inode. The timestamps are the number of
+ * 100-nanosecond intervals that have elapsed since 12:00 A.M., January
+ * 1st, 1601, UTC. This is the same format used in NTFS inodes. */
+ u64 creation_time;
+ u64 last_access_time;
+ u64 last_write_time;
+
+ /* The file attributes associated with this inode. This is a bitwise OR
+ * of the FILE_ATTRIBUTE_* flags. */
+ u32 attributes;
+
+ /* The index of the security descriptor in the WIM image's table of
+ * security descriptors that contains this file's security information.
+ * If -1, no security information exists for this file. */
+ int32_t security_id;
+
+ /* %true iff the inode's lookup table entries has been resolved (i.e.
+ * the @lte field is valid, but the @hash field is not valid)
+ *
+ * (This is not an on-disk field.) */
+ u8 resolved : 1;
+
+ /* %true iff verify_inode() has run on this dentry. */
+ u8 verified : 1;
+
+ /* Number of alternate data streams associated with this inode */
+ u16 num_ads;
+
+ /* A hash of the file's contents, or a pointer to the lookup table entry
+ * for this dentry if the lookup table entries have been resolved.
+ *
+ * More specifically, this is for the un-named default file stream, as
+ * opposed to the alternate (named) file streams, which may have their
+ * own lookup table entries. */
+ union {
+ u8 hash[SHA1_HASH_SIZE];
+ struct lookup_table_entry *lte;
+ };
+
+ /* Identity of a reparse point. See
+ * http://msdn.microsoft.com/en-us/library/windows/desktop/aa365503(v=vs.85).aspx
+ * for what a reparse point is. */
+ u32 reparse_tag;
+
+ /* Number of dentries that reference this inode */
+ u32 link_count;
+
+ /* Alternate data stream entries. */
+ struct ads_entry *ads_entries;
+
+ /* Inode number */
+ u64 ino;
+
+ /* List of dentries that reference this inode (there should be
+ * link_count of them) */
+ struct list_head dentry_list;
+ struct hlist_node hlist;
+ char *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 children;
+
+#ifdef WITH_FUSE
+ /* wimfs file descriptors table for the inode */
+ u16 num_opened_fds;
+ u16 num_allocated_fds;
+ struct wimlib_fd **fds;
+
+ /* Next alternate data stream ID to be assigned */
+ u32 next_stream_id;
+
+ /* 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