+ /* Length of full path name encoded using "tchars", in bytes, not
+ * including the terminating null character. */
+ u32 full_path_nbytes;
+
+ /* Has this dentry been extracted yet? */
+ u8 is_extracted : 1;
+
+ /* Only used during NTFS capture */
+ u8 is_win32_name : 1;
+
+ /* Temporary list */
+ struct list_head tmp_list;
+
+ /* List of dentries in the inode (hard link set) */
+ struct list_head d_alias;
+
+ /* The parent of this directory entry. */
+ struct wim_dentry *parent;
+
+ /*
+ * Size of directory entry on disk, in bytes. Typical size is around
+ * 104 to 120 bytes.
+ *
+ * It is possible for the length field to be 0. This situation, which
+ * is undocumented, indicates the end of a list of sibling nodes in a
+ * directory. It also means the real length is 8, because the dentry
+ * included only the length field, but that takes up 8 bytes.
+ *
+ * The length here includes the base directory entry on disk as well as
+ * the long and short filenames. It does NOT include any alternate
+ * stream entries that may follow the directory entry, even though the
+ * size of those needs to be considered. The length SHOULD be 8-byte
+ * aligned, although we don't require it to be. We do require the
+ * length to be large enough to hold the file name(s) of the dentry;
+ * additionally, a warning is issued if this field is larger than the
+ * aligned size.
+ */
+ u64 length;
+
+ /* The offset, from the start of the uncompressed WIM metadata resource
+ * for this image, of this dentry's child dentries. 0 if the directory
+ * entry has no children, which is the case for regular files or reparse
+ * points. */
+ u64 subdir_offset;
+
+ /* Pointer to the UTF-16LE short filename (malloc()ed buffer) */
+ utf16lechar *short_name;
+
+ /* Pointer to the UTF-16LE filename (malloc()ed buffer). */
+ utf16lechar *file_name;
+
+ /* Full path of this dentry */
+ tchar *_full_path;
+};
+
+#define rbnode_dentry(node) container_of(node, struct wim_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 wim_inode {