]> wimlib.net Git - wimlib/blob - include/wimlib/inode_table.h
WIMBoot / system compression: try WOFADK in addition to WOF
[wimlib] / include / wimlib / inode_table.h
1 #ifndef _WIMLIB_INODE_TABLE_H
2 #define _WIMLIB_INODE_TABLE_H
3
4 #include "wimlib/list.h"
5 #include "wimlib/types.h"
6
7 struct wim_dentry;
8
9 /* Hash table to find inodes for hard link detection, given an inode number (in
10  * the case of reading a WIM image), or both an inode number and a device number
11  * (in the case of adding files to a WIM image).  Also contains an extra list to
12  * hold inodes for which no additional hard link detection is desired.  In both
13  * cases the inodes are linked by i_hlist_node.  */
14 struct wim_inode_table {
15         struct hlist_head *array;
16         size_t capacity;
17         struct hlist_head extra_inodes;
18 };
19
20
21 extern int
22 init_inode_table(struct wim_inode_table *table, size_t capacity);
23
24 extern int
25 inode_table_new_dentry(struct wim_inode_table *table, const tchar *name,
26                        u64 ino, u64 devno, bool noshare,
27                        struct wim_dentry **dentry_ret);
28
29 extern void
30 inode_table_prepare_inode_list(struct wim_inode_table *table,
31                                struct hlist_head *head);
32
33 extern void
34 destroy_inode_table(struct wim_inode_table *table);
35
36 #endif /* _WIMLIB_INODE_TABLE_H  */