- /* When a WIM file is written, out_refcnt starts at 0 and is incremented
- * whenever the file resource pointed to by this lookup table entry
- * needs to be written. Naturally, the file resource only need to be
- * written when out_refcnt is 0. Incrementing it further is needed to
- * find the correct reference count to write to the lookup table in the
- * output file, which may be less than the regular refcnt if not all
- * images in the WIM file are written.
- *
- * output_resource_entry is the struct resource_entry for the position of the
- * file resource when written to the output file. */
- u32 out_refcnt;
- struct resource_entry output_resource_entry;
-
- /* Circular linked list of streams that share the same lookup table
- * entry
- *
- * This list of streams may include streams from different hard link
- * sets that happen to be the same. */
- struct list_head lte_group_list;
-
- /* List of lookup table entries that correspond to streams that have
- * been extracted to the staging directory when modifying a read-write
- * mounted WIM. */
- struct list_head staging_list;
+ /* Actual reference count to this stream (only used while
+ * verifying an image). */
+ u32 real_refcnt;
+
+ union {
+ #ifdef WITH_FUSE
+ /* Number of times this stream has been opened (used only during
+ * mounting) */
+ u16 num_opened_fds;
+ #endif
+
+ /* This field is used for the special hardlink or symlink image
+ * extraction mode. In these mode, all identical files are linked
+ * together, and @extracted_file will be set to the filename of the
+ * first extracted file containing this stream. */
+ tchar *extracted_file;
+ };
+
+ union {
+ /* When a WIM file is written, @output_resource_entry is filled
+ * in with the resource entry for the output WIM. This will not
+ * necessarily be the same as the @resource_entry since: - The
+ * stream may have a different offset in the new WIM - The
+ * stream may have a different compressed size in the new WIM if
+ * the compression type changed
+ */
+ struct resource_entry output_resource_entry;
+
+ struct {
+ struct list_head msg_list;
+ struct list_head being_compressed_list;
+ };
+ struct list_head inode_list;
+
+ struct {
+ struct hlist_node hash_list_2;
+
+ struct list_head write_streams_list;
+ };
+ };
+
+ /* Temporary list fields */
+ union {
+ struct list_head unhashed_list;
+ struct list_head swm_stream_list;
+ struct list_head extraction_list;
+ struct list_head export_stream_list;
+ };