1 /****************************************************************************
2 ****************************************************************************
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
10 ****************************************************************************
11 ****************************************************************************/
17 #define AGGRESSIVE_TEST_
19 #define EXTENTS_STATS__
21 #define CHECK_BINSEARCH__
25 #define ext_debug(a...) printk(a)
27 #define ext_debug(a...)
39 struct ext4_extent_idx {
46 struct ext4_extent_header {
54 #define EXT4_EXT_MAGIC 0xf30a
56 struct ext4_ext_path {
59 struct ext4_extent *p_ext;
60 struct ext4_extent_idx *p_idx;
61 struct ext4_extent_header *p_hdr;
62 struct buffer_head *p_bh;
65 #define EXT4_EXT_CACHE_NO 0
66 #define EXT4_EXT_CACHE_GAP 1
67 #define EXT4_EXT_CACHE_EXTENT 2
69 #define EXT_CONTINUE 0
73 #define EXT_MAX_BLOCK 0xffffffff
75 #define EXT_INIT_MAX_LEN (1UL << 15)
76 #define EXT_UNINIT_MAX_LEN (EXT_INIT_MAX_LEN - 1)
78 #define EXT_FIRST_EXTENT(__hdr__) ((struct ext4_extent *) (((char *) (__hdr__)) + sizeof(struct ext4_extent_header)))
79 #define EXT_FIRST_INDEX(__hdr__) ((struct ext4_extent_idx *) (((char *) (__hdr__)) + sizeof(struct ext4_extent_header)))
80 #define EXT_HAS_FREE_INDEX(__path__) (le16_to_cpu((__path__)->p_hdr->eh_entries) < le16_to_cpu((__path__)->p_hdr->eh_max))
81 #define EXT_LAST_EXTENT(__hdr__) (EXT_FIRST_EXTENT((__hdr__)) + le16_to_cpu((__hdr__)->eh_entries) - 1)
82 #define EXT_LAST_INDEX(__hdr__) (EXT_FIRST_INDEX((__hdr__)) + le16_to_cpu((__hdr__)->eh_entries) - 1)
83 #define EXT_MAX_EXTENT(__hdr__) (EXT_FIRST_EXTENT((__hdr__)) + le16_to_cpu((__hdr__)->eh_max) - 1)
84 #define EXT_MAX_INDEX(__hdr__) (EXT_FIRST_INDEX((__hdr__)) + le16_to_cpu((__hdr__)->eh_max) - 1)