30 #define AGGRESSIVE_TEST_
37 #define EXTENTS_STATS__
43 #define CHECK_BINSEARCH__
50 #define ext_debug(fmt, ...) printk(fmt, ##__VA_ARGS__)
52 #define ext_debug(fmt, ...) no_printk(fmt, ##__VA_ARGS__)
115 #define EXT4_EXT_MAGIC cpu_to_le16(0xf30a)
117 #define EXT4_EXTENT_TAIL_OFFSET(hdr) \
118 (sizeof(struct ext4_extent_header) + \
119 (sizeof(struct ext4_extent) * le16_to_cpu((hdr)->eh_max)))
156 #define EXT_CONTINUE 0
164 #define EXT_MAX_BLOCKS 0xffffffff
183 #define EXT_INIT_MAX_LEN (1UL << 15)
184 #define EXT_UNINIT_MAX_LEN (EXT_INIT_MAX_LEN - 1)
187 #define EXT_FIRST_EXTENT(__hdr__) \
188 ((struct ext4_extent *) (((char *) (__hdr__)) + \
189 sizeof(struct ext4_extent_header)))
190 #define EXT_FIRST_INDEX(__hdr__) \
191 ((struct ext4_extent_idx *) (((char *) (__hdr__)) + \
192 sizeof(struct ext4_extent_header)))
193 #define EXT_HAS_FREE_INDEX(__path__) \
194 (le16_to_cpu((__path__)->p_hdr->eh_entries) \
195 < le16_to_cpu((__path__)->p_hdr->eh_max))
196 #define EXT_LAST_EXTENT(__hdr__) \
197 (EXT_FIRST_EXTENT((__hdr__)) + le16_to_cpu((__hdr__)->eh_entries) - 1)
198 #define EXT_LAST_INDEX(__hdr__) \
199 (EXT_FIRST_INDEX((__hdr__)) + le16_to_cpu((__hdr__)->eh_entries) - 1)
200 #define EXT_MAX_EXTENT(__hdr__) \
201 (EXT_FIRST_EXTENT((__hdr__)) + le16_to_cpu((__hdr__)->eh_max) - 1)
202 #define EXT_MAX_INDEX(__hdr__) \
203 (EXT_FIRST_INDEX((__hdr__)) + le16_to_cpu((__hdr__)->eh_max) - 1)
215 static inline unsigned short ext_depth(
struct inode *
inode)
221 ext4_ext_invalidate_cache(
struct inode *inode)
223 EXT4_I(inode)->i_cached_extent.ec_len = 0;
226 static inline void ext4_ext_mark_uninitialized(
struct ext4_extent *
ext)
233 static inline int ext4_ext_is_uninitialized(
struct ext4_extent *ext)
239 static inline int ext4_ext_get_actual_len(
struct ext4_extent *ext)
246 static inline void ext4_ext_mark_initialized(
struct ext4_extent *ext)
282 static inline void ext4_ext_store_pblock(
struct ext4_extent *ex,
304 ext4_lblk_t lblocks);
318 int search_hint_reverse);