]> wimlib.net Git - wimlib/blobdiff - src/lookup_table.h
wimfs_write(), dentry_to_stbuf()
[wimlib] / src / lookup_table.h
index faf62a02bc33039f8c817712b6c8de4aeebeddbf..434b9d89a48bb5d39e388480c379a820bd6df1c2 100644 (file)
@@ -21,6 +21,8 @@ struct lookup_table {
        u64 capacity;
 };
 
+struct wimlib_fd;
+
 /* An entry in the lookup table in the WIM file. */
 struct lookup_table_entry {
 
@@ -80,22 +82,10 @@ struct lookup_table_entry {
                        /* Compression type used in other WIM. */
                        int   other_wim_ctype;
                };
-
-               struct { /* Used for read-write mounts. */
-
-
-                       /* Offset of the stream file_on_disk_fd. */
-                       off_t staging_offset;
-
-
-                       /* If file_on_disk_fd, if it is not -1, is the file
-                        * descriptor, opened for reading, for file_on_disk. */
-                       int staging_fd;
-
-                       /* Number of times the file has been opened.
-                        * file_on_disk_fd can be closed when num_times_opened
-                        * is decremented to 0.  */
-                       int staging_num_times_opened;
+               struct {
+                       struct wimlib_fd **fds;
+                       u16 num_allocated_fds;
+                       u16 num_opened_fds;
                };
        };
 
@@ -125,8 +115,8 @@ extern void lookup_table_insert(struct lookup_table *table,
 extern void lookup_table_unlink(struct lookup_table *table, 
                                struct lookup_table_entry *lte);
 
-extern bool lookup_table_decrement_refcnt(struct lookup_table* table, 
-                                         const u8 hash[]);
+extern struct lookup_table_entry *
+lookup_table_decrement_refcnt(struct lookup_table* table, const u8 hash[]);
 
 
 extern struct lookup_table_entry *new_lookup_table_entry();