-
- /* (Extraction only) List head for building a list of dentries that
- * contain a certain stream. */
- struct list_head extraction_stream_list;
-};
-
-#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 {
- /* 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 i_creation_time;
- u64 i_last_access_time;
- u64 i_last_write_time;
-
- /* The file attributes associated with this inode. This is a bitwise OR
- * of the FILE_ATTRIBUTE_* flags. */
- u32 i_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 i_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 i_resolved : 1;
-
- u8 i_visited : 1;
-
- /* Used only in NTFS-mode extraction */
- u8 i_dos_name_extracted : 1;
-
- /* Set to 0 if reparse point fixups have been done. Otherwise set to 1.
- *
- * Note: this actually may reflect the SYMBOLIC_LINK_RELATIVE flag. */
- u16 i_not_rpfixed;
-
- /* Number of alternate data streams associated with this inode */
- u16 i_num_ads;
-
- /* Unused/unknown fields that we just read into memory so we can
- * re-write them unchanged. */
- u32 i_rp_unknown_1;
- u16 i_rp_unknown_2;
-
- /* If i_resolved == 0:
- * SHA1 message digest of the contents of the unnamed-data stream
- * of this inode, or all zeroes if this inode has no unnamed data
- * stream, or optionally all zeroes if this inode has an empty
- * unnamed data stream.
- *
- * If i_resolved == 1:
- * Pointer to the lookup table entry for the unnamed data stream
- * of this inode, or NULL if this inode has no unnamed data stream,
- * or optionally all zeroes if this inode has an empty unnamed data
- * stream.
- */
- union {
- u8 i_hash[SHA1_HASH_SIZE];
- struct wim_lookup_table_entry *i_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 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;
-
- /* Device number, used only during image capture */
- u64 i_devno;
-
- /* List of dentries that reference this inode (there should be i_nlink
- * of them) */
- struct list_head i_dentry;
-
- union {
- struct hlist_node i_hlist;
- struct list_head i_list;
- };
-
- 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;
-
-#ifdef __WIN32__
- struct rb_root i_children_case_insensitive;
-#endif
-
- /* 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