diff options
| author | ngkaho1234 <ngkaho1234@gmail.com> | 2016-01-31 22:31:05 +0800 |
|---|---|---|
| committer | ngkaho1234 <ngkaho1234@gmail.com> | 2016-01-31 15:57:43 +0000 |
| commit | 252c506239ab570c0f671513a3b17d3a44f86b5c (patch) | |
| tree | 205681753f461e59880c2447588efd710b182746 /include/ext4_xattr.h | |
| parent | 3e42ad4c558d5f3e12cdf22f4d6610836c7df129 (diff) | |
Refactor header files dependencies.
Diffstat (limited to 'include/ext4_xattr.h')
| -rw-r--r-- | include/ext4_xattr.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/include/ext4_xattr.h b/include/ext4_xattr.h index f6076d2..9345ea1 100644 --- a/include/ext4_xattr.h +++ b/include/ext4_xattr.h @@ -43,6 +43,40 @@ extern "C" { #include "ext4_config.h" #include "ext4_types.h" +#include "misc/tree.h" +#include "misc/queue.h" + +struct ext4_xattr_item { + /* This attribute should be stored in inode body */ + bool in_inode; + + uint8_t name_index; + char *name; + size_t name_len; + void *data; + size_t data_size; + + RB_ENTRY(ext4_xattr_item) node; +}; + +struct ext4_xattr_ref { + bool block_loaded; + struct ext4_block block; + struct ext4_inode_ref *inode_ref; + bool dirty; + size_t ea_size; + struct ext4_fs *fs; + + void *iter_arg; + struct ext4_xattr_item *iter_from; + + RB_HEAD(ext4_xattr_tree, + ext4_xattr_item) root; +}; + +#define EXT4_XATTR_ITERATE_CONT 0 +#define EXT4_XATTR_ITERATE_STOP 1 +#define EXT4_XATTR_ITERATE_PAUSE 2 int ext4_fs_get_xattr_ref(struct ext4_fs *fs, struct ext4_inode_ref *inode_ref, struct ext4_xattr_ref *ref); |
