50#define EXT4_EXT_MAGIC 0xf30a
51#define get_ext4_header(i) ((struct ext4_extent_header *) (i)->i_block)
53#define EXT4_EXTENT_TAIL_OFFSET(hdr) \
54 (sizeof(struct ext4_extent_header) + \
55 (sizeof(struct ext4_extent) * (hdr)->eh_max))
101#define EXT_INIT_MAX_LEN (1UL << 15)
102#define EXT_UNWRITTEN_MAX_LEN (EXT_INIT_MAX_LEN - 1)
104#define EXT_EXTENT_SIZE sizeof(struct ext4_extent)
105#define EXT_INDEX_SIZE sizeof(struct ext4_extent_idx)
107#define EXT_FIRST_EXTENT(__hdr__) \
108 ((struct ext4_extent *)(((char *)(__hdr__)) + \
109 sizeof(struct ext4_extent_header)))
110#define EXT_FIRST_INDEX(__hdr__) \
111 ((struct ext4_extent_idx *)(((char *)(__hdr__)) + \
112 sizeof(struct ext4_extent_header)))
113#define EXT_HAS_FREE_INDEX(__path__) \
114 ((__path__)->p_hdr->eh_entries < (__path__)->p_hdr->eh_max)
115#define EXT_LAST_EXTENT(__hdr__) \
116 (EXT_FIRST_EXTENT((__hdr__)) + (__hdr__)->eh_entries - 1)
117#define EXT_LAST_INDEX(__hdr__) \
118 (EXT_FIRST_INDEX((__hdr__)) + (__hdr__)->eh_entries - 1)
119#define EXT_MAX_EXTENT(__hdr__) \
120 (EXT_FIRST_EXTENT((__hdr__)) + (__hdr__)->eh_max - 1)
121#define EXT_MAX_INDEX(__hdr__) \
122 (EXT_FIRST_INDEX((__hdr__)) + (__hdr__)->eh_max - 1)
209 ex->ee_start_lo = (
uint32_t)(pb & 0xffffffff);
210 ex->ee_start_hi = (
uint16_t)((pb >> 31) >> 1) & 0xffff;
225#define ext4_ext_dirty(icb, handle, inode, path) \
226 __ext4_ext_dirty("", __LINE__, (icb), (handle), (inode), (path))
228#define INODE_HAS_EXTENT(i) ((i)->i_flags & EXT2_EXTENTS_FL)
252 unsigned long max_blocks,
struct buffer_head *bh_result,
unsigned short int uint16_t
static const WCHAR *const ext[]
unsigned long long ext4_fsblk_t
static void ext4_ext_mark_unwritten(struct ext4_extent *ext)
#define EXT4_EXTENT_TAIL_OFFSET(hdr)
int ext4_ext_tree_init(void *icb, handle_t *handle, struct inode *inode)
static void ext4_idx_store_pblock(struct ext4_extent_idx *ix, ext4_fsblk_t pb)
static struct ext4_extent_header * ext_inode_hdr(struct inode *inode)
static int ext4_ext_is_unwritten(struct ext4_extent *ext)
#define get_ext4_header(i)
static void ext4_ext_mark_initialized(struct ext4_extent *ext)
struct ext4_ext_path __attribute__
static void ext4_ext_mark_uninitialized(struct ext4_extent *ext)
static struct ext4_extent_header * ext_block_hdr(struct buffer_head *bh)
static uint64_t ext_to_block(EXT4_EXTENT *extent)
static struct ext4_extent_tail * find_ext4_extent_tail(struct ext4_extent_header *eh)
int ext4_ext_truncate(void *icb, struct inode *inode, unsigned long start)
static uint64_t idx_to_block(EXT4_EXTENT_IDX *idx)
static int ext4_ext_is_uninitialized(struct ext4_extent *ext)
static ext4_fsblk_t ext4_idx_pblock(struct ext4_extent_idx *ix)
static unsigned short ext_depth(struct inode *inode)
static ext4_fsblk_t ext4_ext_pblock(struct ext4_extent *ex)
static void ext4_ext_store_pblock(struct ext4_extent *ex, ext4_fsblk_t pb)
static uint16_t ext4_ext_get_actual_len(struct ext4_extent *ext)
int ext4_ext_get_blocks(void *icb, handle_t *handle, struct inode *inode, ext4_fsblk_t iblock, unsigned long max_blocks, struct buffer_head *bh_result, int create, int flags)
static const struct access_res create[16]
struct ext4_extent_header * p_hdr
struct buffer_head * p_bh
struct ext4_extent_idx * p_idx
struct ext4_extent * p_ext
static unsigned int block