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 | |
| parent | 3e42ad4c558d5f3e12cdf22f4d6610836c7df129 (diff) | |
Refactor header files dependencies.
Diffstat (limited to 'include')
| -rw-r--r-- | include/ext4.h | 4 | ||||
| -rw-r--r-- | include/ext4_balloc.h | 2 | ||||
| -rw-r--r-- | include/ext4_blockdev.h | 2 | ||||
| -rw-r--r-- | include/ext4_dir.h | 1 | ||||
| -rw-r--r-- | include/ext4_dir_idx.h | 3 | ||||
| -rw-r--r-- | include/ext4_extent.h | 17 | ||||
| -rw-r--r-- | include/ext4_fs.h | 26 | ||||
| -rw-r--r-- | include/ext4_hash.h | 8 | ||||
| -rw-r--r-- | include/ext4_inode.h | 1 | ||||
| -rw-r--r-- | include/ext4_journal.h | 68 | ||||
| -rw-r--r-- | include/ext4_misc.h | 151 | ||||
| -rw-r--r-- | include/ext4_mkfs.h | 4 | ||||
| -rw-r--r-- | include/ext4_super.h | 1 | ||||
| -rw-r--r-- | include/ext4_types.h | 250 | ||||
| -rw-r--r-- | include/ext4_xattr.h | 34 |
15 files changed, 325 insertions, 247 deletions
diff --git a/include/ext4.h b/include/ext4.h index bf6e101..78e8647 100644 --- a/include/ext4.h +++ b/include/ext4.h @@ -46,9 +46,11 @@ extern "C" { #include <stddef.h> #include "ext4_config.h" +#include "ext4_types.h" #include "ext4_errno.h" #include "ext4_oflags.h" -#include "ext4_types.h" +#include "ext4_debug.h" + #include "ext4_blockdev.h" /********************************OS LOCK INFERFACE***************************/ diff --git a/include/ext4_balloc.h b/include/ext4_balloc.h index f2c3dc9..4e2f224 100644 --- a/include/ext4_balloc.h +++ b/include/ext4_balloc.h @@ -48,6 +48,8 @@ extern "C" { #include "ext4_config.h" #include "ext4_types.h" +#include "ext4_fs.h" + #include <stdint.h> #include <stdbool.h> diff --git a/include/ext4_blockdev.h b/include/ext4_blockdev.h index f5329ec..b54c318 100644 --- a/include/ext4_blockdev.h +++ b/include/ext4_blockdev.h @@ -42,8 +42,6 @@ extern "C" { #include "ext4_config.h" #include "ext4_bcache.h" -#include "ext4_trans.h" -#include "ext4_debug.h" #include <stdbool.h> #include <stdint.h> diff --git a/include/ext4_dir.h b/include/ext4_dir.h index 37547ea..7b06843 100644 --- a/include/ext4_dir.h +++ b/include/ext4_dir.h @@ -48,6 +48,7 @@ extern "C" { #include "ext4_config.h" #include "ext4_types.h" +#include "ext4_misc.h" #include "ext4_blockdev.h" #include "ext4_super.h" diff --git a/include/ext4_dir_idx.h b/include/ext4_dir_idx.h index dd0067d..d3275d5 100644 --- a/include/ext4_dir_idx.h +++ b/include/ext4_dir_idx.h @@ -49,6 +49,9 @@ extern "C" { #include "ext4_config.h" #include "ext4_types.h" +#include "ext4_fs.h" +#include "ext4_dir.h" + #include <stdint.h> #include <stdbool.h> diff --git a/include/ext4_extent.h b/include/ext4_extent.h index 1d4ddf1..79a6196 100644 --- a/include/ext4_extent.h +++ b/include/ext4_extent.h @@ -50,6 +50,23 @@ extern "C" { #include "ext4_inode.h" +/* + * Array of ext4_ext_path contains path to some extent. + * Creation/lookup routines use it for traversal/splitting/etc. + * Truncate uses it to simulate recursive walking. + */ +struct ext4_extent_path { + ext4_fsblk_t p_block; + struct ext4_block block; + int32_t depth; + int32_t maxdepth; + struct ext4_extent_header *header; + struct ext4_extent_index *index; + struct ext4_extent *extent; + +}; + + /**@brief Get logical number of the block covered by extent. * @param extent Extent to load number from * @return Logical number of the first block covered by extent */ diff --git a/include/ext4_fs.h b/include/ext4_fs.h index 473929d..ba55da9 100644 --- a/include/ext4_fs.h +++ b/include/ext4_fs.h @@ -48,10 +48,36 @@ extern "C" { #include "ext4_config.h" #include "ext4_types.h" +#include "ext4_misc.h" #include <stdint.h> #include <stdbool.h> +struct ext4_fs { + bool read_only; + + struct ext4_blockdev *bdev; + struct ext4_sblock sb; + + uint64_t inode_block_limits[4]; + uint64_t inode_blocks_per_level[4]; + + uint32_t last_inode_bg_id; + + struct jbd_fs *jbd_fs; + struct jbd_journal *jbd_journal; + struct jbd_trans *curr_trans; +}; + +struct ext4_block_group_ref { + struct ext4_block block; + struct ext4_bgroup *block_group; + struct ext4_fs *fs; + uint32_t index; + bool dirty; +}; + + /**@brief Convert block address to relative index in block group. * @param sb Superblock pointer * @param baddr Block number to convert diff --git a/include/ext4_hash.h b/include/ext4_hash.h index b7a9ac5..17989a1 100644 --- a/include/ext4_hash.h +++ b/include/ext4_hash.h @@ -45,6 +45,14 @@ extern "C" { #include <stdint.h> +struct ext4_hash_info { + uint32_t hash; + uint32_t minor_hash; + uint32_t hash_version; + const uint32_t *seed; +}; + + /**@brief Directory entry name hash function. * @param name entry name * @param len entry name length diff --git a/include/ext4_inode.h b/include/ext4_inode.h index 90c5754..9c1f3f0 100644 --- a/include/ext4_inode.h +++ b/include/ext4_inode.h @@ -47,6 +47,7 @@ extern "C" { #endif #include "ext4_config.h" +#include "ext4_types.h" #include <stdint.h> diff --git a/include/ext4_journal.h b/include/ext4_journal.h index 8e193cc..6961e15 100644 --- a/include/ext4_journal.h +++ b/include/ext4_journal.h @@ -43,6 +43,74 @@ extern "C" { #include "ext4_config.h" #include "ext4_types.h" +#include "misc/queue.h" +#include "misc/tree.h" + +struct jbd_fs { + /* If journal block device is used, bdev will be non-null */ + struct ext4_blockdev *bdev; + struct ext4_inode_ref inode_ref; + struct jbd_sb sb; + + bool dirty; +}; + +struct jbd_buf { + uint64_t jbd_lba; + struct ext4_block block; + struct jbd_trans *trans; + struct jbd_block_rec *block_rec; + TAILQ_ENTRY(jbd_buf) buf_node; + TAILQ_ENTRY(jbd_buf) dirty_buf_node; +}; + +struct jbd_revoke_rec { + ext4_fsblk_t lba; + LIST_ENTRY(jbd_revoke_rec) revoke_node; +}; + +struct jbd_block_rec { + ext4_fsblk_t lba; + struct ext4_buf *buf; + struct jbd_trans *trans; + RB_ENTRY(jbd_block_rec) block_rec_node; + LIST_ENTRY(jbd_block_rec) tbrec_node; + TAILQ_HEAD(jbd_buf_dirty, jbd_buf) dirty_buf_queue; +}; + +struct jbd_trans { + uint32_t trans_id; + + uint32_t start_iblock; + int alloc_blocks; + int data_cnt; + uint32_t data_csum; + int written_cnt; + int error; + + struct jbd_journal *journal; + + TAILQ_HEAD(jbd_trans_buf, jbd_buf) buf_queue; + LIST_HEAD(jbd_revoke_list, jbd_revoke_rec) revoke_list; + LIST_HEAD(jbd_trans_block_rec, jbd_block_rec) tbrec_list; + TAILQ_ENTRY(jbd_trans) trans_node; +}; + +struct jbd_journal { + uint32_t first; + uint32_t start; + uint32_t last; + uint32_t trans_id; + uint32_t alloc_trans_id; + + uint32_t block_size; + + TAILQ_HEAD(jbd_trans_queue, jbd_trans) trans_queue; + TAILQ_HEAD(jbd_cp_queue, jbd_trans) cp_queue; + RB_HEAD(jbd_block, jbd_block_rec) block_rec_root; + + struct jbd_fs *jbd_fs; +}; int jbd_get_fs(struct ext4_fs *fs, struct jbd_fs *jbd_fs); diff --git a/include/ext4_misc.h b/include/ext4_misc.h new file mode 100644 index 0000000..e5dcff6 --- /dev/null +++ b/include/ext4_misc.h @@ -0,0 +1,151 @@ +/* + * Copyright (c) 2015 Grzegorz Kostka (kostka.grzegorz@gmail.com) + * Copyright (c) 2015 Kaho Ng (ngkaho1234@gmail.com) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * - The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** @addtogroup lwext4 + * @{ + */ +/** + * @file ext4_misc.h + * @brief Miscellaneous helpers. + */ + +#ifndef EXT4_MISC_H_ +#define EXT4_MISC_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include <stdint.h> + +/****************************Endian conversion*****************/ + +static inline uint64_t reorder64(uint64_t n) +{ + return ((n & 0xff) << 56) | + ((n & 0xff00) << 40) | + ((n & 0xff0000) << 24) | + ((n & 0xff000000LL) << 8) | + ((n & 0xff00000000LL) >> 8) | + ((n & 0xff0000000000LL) >> 24) | + ((n & 0xff000000000000LL) >> 40) | + ((n & 0xff00000000000000LL) >> 56); +} + +static inline uint32_t reorder32(uint32_t n) +{ + return ((n & 0xff) << 24) | + ((n & 0xff00) << 8) | + ((n & 0xff0000) >> 8) | + ((n & 0xff000000) >> 24); +} + +static inline uint16_t reorder16(uint16_t n) +{ + return ((n & 0xff) << 8) | + ((n & 0xff00) >> 8); +} + +#ifdef CONFIG_BIG_ENDIAN +#define to_le64(_n) reorder64(_n) +#define to_le32(_n) reorder32(_n) +#define to_le16(_n) reorder16(_n) + +#define to_be64(_n) _n +#define to_be32(_n) _n +#define to_be16(_n) _n + +#else +#define to_le64(_n) _n +#define to_le32(_n) _n +#define to_le16(_n) _n + +#define to_be64(_n) reorder64(_n) +#define to_be32(_n) reorder32(_n) +#define to_be16(_n) reorder16(_n) +#endif + +/****************************Access macros to ext4 structures*****************/ + +#define ext4_get32(s, f) to_le32((s)->f) +#define ext4_get16(s, f) to_le16((s)->f) +#define ext4_get8(s, f) (s)->f + +#define ext4_set32(s, f, v) \ + do { \ + (s)->f = to_le32(v); \ + } while (0) +#define ext4_set16(s, f, v) \ + do { \ + (s)->f = to_le16(v); \ + } while (0) +#define ext4_set8 \ + (s, f, v) do { (s)->f = (v); } \ + while (0) + +/****************************Access macros to jbd2 structures*****************/ + +#define jbd_get32(s, f) to_be32((s)->f) +#define jbd_get16(s, f) to_be16((s)->f) +#define jbd_get8(s, f) (s)->f + +#define jbd_set32(s, f, v) \ + do { \ + (s)->f = to_be32(v); \ + } while (0) +#define jbd_set16(s, f, v) \ + do { \ + (s)->f = to_be16(v); \ + } while (0) +#define jbd_set8 \ + (s, f, v) do { (s)->f = (v); } \ + while (0) + +#ifdef __GNUC__ + #ifndef __unused + #define __unused __attribute__ ((__unused__)) + #endif +#else + #define __unused +#endif + +#ifndef offsetof +#define offsetof(type, field) \ + ((size_t)(&(((type *)0)->field))) +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* EXT4_MISC_H_ */ + +/** + * @} + */ diff --git a/include/ext4_mkfs.h b/include/ext4_mkfs.h index ed8faf9..e22ff88 100644 --- a/include/ext4_mkfs.h +++ b/include/ext4_mkfs.h @@ -43,12 +43,13 @@ extern "C" { #include "ext4_config.h" #include "ext4_types.h" + #include "ext4_blockdev.h" +#include "ext4_fs.h" #include <stdbool.h> #include <stdint.h> - struct ext4_mkfs_info { uint64_t len; uint32_t block_size; @@ -66,6 +67,7 @@ struct ext4_mkfs_info { const char *label; }; + int ext4_mkfs_read_info(struct ext4_blockdev *bd, struct ext4_mkfs_info *info); int ext4_mkfs(struct ext4_fs *fs, struct ext4_blockdev *bd, diff --git a/include/ext4_super.h b/include/ext4_super.h index 2172698..b420225 100644 --- a/include/ext4_super.h +++ b/include/ext4_super.h @@ -48,6 +48,7 @@ extern "C" { #include "ext4_config.h" #include "ext4_types.h" +#include "ext4_misc.h" /**@brief Blocks count get stored in superblock. * @param s superblock descriptor diff --git a/include/ext4_types.h b/include/ext4_types.h index ca3a8c2..2a60942 100644 --- a/include/ext4_types.h +++ b/include/ext4_types.h @@ -53,6 +53,13 @@ extern "C" { #include <stddef.h> #include <stdint.h> +/* + * Types of blocks. + */ +typedef uint32_t ext4_lblk_t; +typedef uint64_t ext4_fsblk_t; + + #define EXT4_CHECKSUM_CRC32C 1 #define UUID_SIZE 16 @@ -302,21 +309,6 @@ struct ext4_sblock { EXT4_FRO_COM_QUOTA) #endif -struct ext4_fs { - bool read_only; - - struct ext4_blockdev *bdev; - struct ext4_sblock sb; - - uint64_t inode_block_limits[4]; - uint64_t inode_blocks_per_level[4]; - - uint32_t last_inode_bg_id; - - struct jbd_fs *jbd_fs; - struct jbd_journal *jbd_journal; - struct jbd_trans *curr_trans; -}; /* Inode table/bitmap not in use */ #define EXT4_BLOCK_GROUP_INODE_UNINIT 0x0001 @@ -355,13 +347,6 @@ struct ext4_bgroup { uint32_t reserved; /* Padding */ }; -struct ext4_block_group_ref { - struct ext4_block block; - struct ext4_bgroup *block_group; - struct ext4_fs *fs; - uint32_t index; - bool dirty; -}; #define EXT4_MIN_BLOCK_GROUP_DESCRIPTOR_SIZE 32 #define EXT4_MAX_BLOCK_GROUP_DESCRIPTOR_SIZE 64 @@ -699,29 +684,6 @@ struct ext4_extent_header { #pragma pack(pop) -/* - * Types of blocks. - */ -typedef uint32_t ext4_lblk_t; -typedef uint64_t ext4_fsblk_t; - -/* - * Array of ext4_ext_path contains path to some extent. - * Creation/lookup routines use it for traversal/splitting/etc. - * Truncate uses it to simulate recursive walking. - */ -struct ext4_extent_path { - ext4_fsblk_t p_block; - struct ext4_block block; - int32_t depth; - int32_t maxdepth; - struct ext4_extent_header *header; - struct ext4_extent_index *index; - struct ext4_extent *extent; - -}; - - #define EXT4_EXTENT_MAGIC 0xF30A #define EXT4_EXTENT_FIRST(header) \ @@ -800,12 +762,6 @@ struct ext4_extent_path { #define EXT2_HTREE_EOF 0x7FFFFFFFUL -struct ext4_hash_info { - uint32_t hash; - uint32_t minor_hash; - uint32_t hash_version; - const uint32_t *seed; -}; /* Extended Attribute(EA) */ @@ -853,38 +809,6 @@ struct ext4_xattr_entry { #pragma pack(pop) -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 - #define EXT4_GOOD_OLD_INODE_SIZE 128 #define EXT4_XATTR_PAD_BITS 2 @@ -1129,172 +1053,12 @@ struct jbd_sb { JBD_FEATURE_INCOMPAT_CSUM_V2|\ JBD_FEATURE_INCOMPAT_CSUM_V3) -struct jbd_fs { - /* If journal block device is used, bdev will be non-null */ - struct ext4_blockdev *bdev; - struct ext4_inode_ref inode_ref; - struct jbd_sb sb; - - bool dirty; -}; - -struct jbd_buf { - uint64_t jbd_lba; - struct ext4_block block; - struct jbd_trans *trans; - struct jbd_block_rec *block_rec; - TAILQ_ENTRY(jbd_buf) buf_node; - TAILQ_ENTRY(jbd_buf) dirty_buf_node; -}; - -struct jbd_revoke_rec { - ext4_fsblk_t lba; - LIST_ENTRY(jbd_revoke_rec) revoke_node; -}; - -struct jbd_block_rec { - ext4_fsblk_t lba; - struct ext4_buf *buf; - struct jbd_trans *trans; - RB_ENTRY(jbd_block_rec) block_rec_node; - LIST_ENTRY(jbd_block_rec) tbrec_node; - TAILQ_HEAD(jbd_buf_dirty, jbd_buf) dirty_buf_queue; -}; - -struct jbd_trans { - uint32_t trans_id; - - uint32_t start_iblock; - int alloc_blocks; - int data_cnt; - uint32_t data_csum; - int written_cnt; - int error; - - struct jbd_journal *journal; - - TAILQ_HEAD(jbd_trans_buf, jbd_buf) buf_queue; - LIST_HEAD(jbd_revoke_list, jbd_revoke_rec) revoke_list; - LIST_HEAD(jbd_trans_block_rec, jbd_block_rec) tbrec_list; - TAILQ_ENTRY(jbd_trans) trans_node; -}; - -struct jbd_journal { - uint32_t first; - uint32_t start; - uint32_t last; - uint32_t trans_id; - uint32_t alloc_trans_id; - - uint32_t block_size; - - TAILQ_HEAD(jbd_trans_queue, jbd_trans) trans_queue; - TAILQ_HEAD(jbd_cp_queue, jbd_trans) cp_queue; - RB_HEAD(jbd_block, jbd_block_rec) block_rec_root; - - struct jbd_fs *jbd_fs; -}; - /*****************************************************************************/ #define EXT4_CRC32_INIT (0xFFFFFFFFUL) /*****************************************************************************/ -static inline uint64_t reorder64(uint64_t n) -{ - return ((n & 0xff) << 56) | - ((n & 0xff00) << 40) | - ((n & 0xff0000) << 24) | - ((n & 0xff000000LL) << 8) | - ((n & 0xff00000000LL) >> 8) | - ((n & 0xff0000000000LL) >> 24) | - ((n & 0xff000000000000LL) >> 40) | - ((n & 0xff00000000000000LL) >> 56); -} - -static inline uint32_t reorder32(uint32_t n) -{ - return ((n & 0xff) << 24) | - ((n & 0xff00) << 8) | - ((n & 0xff0000) >> 8) | - ((n & 0xff000000) >> 24); -} - -static inline uint16_t reorder16(uint16_t n) -{ - return ((n & 0xff) << 8) | - ((n & 0xff00) >> 8); -} - -#ifdef CONFIG_BIG_ENDIAN -#define to_le64(_n) reorder64(_n) -#define to_le32(_n) reorder32(_n) -#define to_le16(_n) reorder16(_n) - -#define to_be64(_n) _n -#define to_be32(_n) _n -#define to_be16(_n) _n - -#else -#define to_le64(_n) _n -#define to_le32(_n) _n -#define to_le16(_n) _n - -#define to_be64(_n) reorder64(_n) -#define to_be32(_n) reorder32(_n) -#define to_be16(_n) reorder16(_n) -#endif - -/****************************Access macros to ext4 structures*****************/ - -#define ext4_get32(s, f) to_le32((s)->f) -#define ext4_get16(s, f) to_le16((s)->f) -#define ext4_get8(s, f) (s)->f - -#define ext4_set32(s, f, v) \ - do { \ - (s)->f = to_le32(v); \ - } while (0) -#define ext4_set16(s, f, v) \ - do { \ - (s)->f = to_le16(v); \ - } while (0) -#define ext4_set8 \ - (s, f, v) do { (s)->f = (v); } \ - while (0) - -/****************************Access macros to jbd2 structures*****************/ - -#define jbd_get32(s, f) to_be32((s)->f) -#define jbd_get16(s, f) to_be16((s)->f) -#define jbd_get8(s, f) (s)->f - -#define jbd_set32(s, f, v) \ - do { \ - (s)->f = to_be32(v); \ - } while (0) -#define jbd_set16(s, f, v) \ - do { \ - (s)->f = to_be16(v); \ - } while (0) -#define jbd_set8 \ - (s, f, v) do { (s)->f = (v); } \ - while (0) - -#ifdef __GNUC__ - #ifndef __unused - #define __unused __attribute__ ((__unused__)) - #endif -#else - #define __unused -#endif - -#ifndef offsetof -#define offsetof(type, field) \ - ((size_t)(&(((type *)0)->field))) -#endif - #ifdef __cplusplus } #endif 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); |
