]> wimlib.net Git - wimlib/blobdiff - include/wimlib/inode.h
Implement basic handling of xattr streams
[wimlib] / include / wimlib / inode.h
index b6203fb5b6a3c7698d32730e89f184cf94b87183..7e71d18c115c4debc17d113733ddc08a9609dba6 100644 (file)
@@ -33,6 +33,9 @@ enum wim_inode_stream_type {
         * as well as the encrypted data of all the file's data streams.  */
        STREAM_TYPE_EFSRPC_RAW_DATA,
 
+       /* Extended attributes originating from Linux (wimlib extension) */
+       STREAM_TYPE_LINUX_XATTR,
+
        /* Stream type could not be determined  */
        STREAM_TYPE_UNKNOWN,
 };
@@ -54,6 +57,9 @@ extern const utf16lechar NO_STREAM_NAME[1];
  * one such stream, and it should be unnamed.  However, it is possible for an
  * inode to have both a reparse point stream and an unnamed data stream, and
  * even named data streams as well.
+ *
+ * On Linux, wimlib now also supports storing and restoring extended attributes.
+ * For this an unnamed stream of type STREAM_TYPE_LINUX_XATTR is used.
  */
 struct wim_inode_stream {
 
@@ -107,17 +113,11 @@ struct wim_inode {
        u32 i_attributes;
 
        /* Root of a balanced binary search tree storing the child directory
-        * entries of this inode, if any.  Keyed by wim_dentry->d_name, case
-        * sensitively.  If this inode is not a directory or if it has no
-        * children then this will be an empty tree (NULL).  */
+        * entries of this inode, if any, indexed by filename.  If this inode is
+        * not a directory or if it has no children then this will be an empty
+        * tree (NULL).  */
        struct avl_tree_node *i_children;
 
-       /* Root of a balanced binary search tree storing the child directory
-        * entries of this inode, if any.  Keyed by wim_dentry->d_name, case
-        * insensitively.  If this inode is not a directory or if it has no
-        * children then this will be an empty tree (NULL).  */
-       struct avl_tree_node *i_children_ci;
-
        /* List of dentries that are aliases for this inode.  There will be
         * i_nlink dentries in this list.  */
        struct hlist_head i_alias_list;
@@ -226,6 +226,10 @@ struct wim_inode {
 
        /* Next stream ID to be assigned  */
        u32 i_next_stream_id;
+
+#ifdef ENABLE_TEST_SUPPORT
+       struct wim_inode *i_corresponding;
+#endif
 };
 
 /* Optional extra data for a WIM inode  */
@@ -241,6 +245,7 @@ struct wim_inode_extra {
  */
 #define WIM_IO_REPARSE_TAG_MOUNT_POINT         0xA0000003
 #define WIM_IO_REPARSE_TAG_SYMLINK             0xA000000C
+#define WIM_IO_REPARSE_TAG_DEDUP               0x80000013
 #define WIM_IO_REPARSE_TAG_WOF                 0x80000017
 
 /* Flags for the rp_flags field.  Currently the only known flag is NOT_FIXED,
@@ -360,7 +365,7 @@ inode_replace_stream_data(struct wim_inode *inode,
                          const void *data, size_t size,
                          struct blob_table *blob_table);
 
-extern bool
+extern struct wim_inode_stream *
 inode_add_stream_with_data(struct wim_inode *inode,
                           int stream_type, const utf16lechar *stream_name,
                           const void *data, size_t size,