Lines Matching refs:eh

74 static void dbg_show_header(struct ext3_extent_header *eh)  in dbg_show_header()  argument
77 ext2fs_le16_to_cpu(eh->eh_magic), in dbg_show_header()
78 ext2fs_le16_to_cpu(eh->eh_entries), in dbg_show_header()
79 ext2fs_le16_to_cpu(eh->eh_max), in dbg_show_header()
80 ext2fs_le16_to_cpu(eh->eh_depth), in dbg_show_header()
81 ext2fs_le32_to_cpu(eh->eh_generation)); in dbg_show_header()
124 #define dbg_show_header(eh) do { } while (0) argument
136 struct ext3_extent_header *eh = ptr; in ext2fs_extent_header_verify() local
138 dbg_show_header(eh); in ext2fs_extent_header_verify()
139 if (ext2fs_le16_to_cpu(eh->eh_magic) != EXT3_EXT_MAGIC) in ext2fs_extent_header_verify()
141 if (ext2fs_le16_to_cpu(eh->eh_entries) > ext2fs_le16_to_cpu(eh->eh_max)) in ext2fs_extent_header_verify()
143 if (eh->eh_depth == 0) in ext2fs_extent_header_verify()
148 eh_max = (size - sizeof(*eh)) / entry_size; in ext2fs_extent_header_verify()
151 if ((ext2fs_le16_to_cpu(eh->eh_max) > eh_max) || in ext2fs_extent_header_verify()
152 (ext2fs_le16_to_cpu(eh->eh_max) < (eh_max - 2))) in ext2fs_extent_header_verify()
192 struct ext3_extent_header *eh; in ext2fs_extent_open2() local
217 eh = (struct ext3_extent_header *) &handle->inode->i_block[0]; in ext2fs_extent_open2()
223 eh->eh_magic = ext2fs_cpu_to_le16(EXT3_EXT_MAGIC); in ext2fs_extent_open2()
224 eh->eh_depth = 0; in ext2fs_extent_open2()
225 eh->eh_entries = 0; in ext2fs_extent_open2()
226 i = (sizeof(handle->inode->i_block) - sizeof(*eh)) / in ext2fs_extent_open2()
228 eh->eh_max = ext2fs_cpu_to_le16(i); in ext2fs_extent_open2()
237 retval = ext2fs_extent_header_verify(eh, sizeof(handle->inode->i_block)); in ext2fs_extent_open2()
241 handle->max_depth = ext2fs_le16_to_cpu(eh->eh_depth); in ext2fs_extent_open2()
242 handle->type = ext2fs_le16_to_cpu(eh->eh_magic); in ext2fs_extent_open2()
252 ext2fs_le16_to_cpu(eh->eh_entries); in ext2fs_extent_open2()
253 handle->path[0].max_entries = ext2fs_le16_to_cpu(eh->eh_max); in ext2fs_extent_open2()
278 struct ext3_extent_header *eh; in ext2fs_extent_get() local
388 eh = (struct ext3_extent_header *) path->buf; in ext2fs_extent_get()
389 ix = EXT_FIRST_INDEX(eh); in ext2fs_extent_get()
407 eh = (struct ext3_extent_header *) path->buf; in ext2fs_extent_get()
408 path->curr = EXT_LAST_EXTENT(eh); in ext2fs_extent_get()
449 eh = (struct ext3_extent_header *) newpath->buf; in ext2fs_extent_get()
451 retval = ext2fs_extent_header_verify(eh, handle->fs->blocksize); in ext2fs_extent_get()
458 ext2fs_le16_to_cpu(eh->eh_entries); in ext2fs_extent_get()
459 newpath->max_entries = ext2fs_le16_to_cpu(eh->eh_max); in ext2fs_extent_get()
469 ix = EXT_FIRST_INDEX((struct ext3_extent_header *) eh); in ext2fs_extent_get()
474 ix = EXT_LAST_INDEX((struct ext3_extent_header *) eh); in ext2fs_extent_get()
832 struct ext3_extent_header *eh, *neweh; in ext2fs_extent_node_split() local
892 eh = (struct ext3_extent_header *)path->buf; in ext2fs_extent_node_split()
897 tocopy = ext2fs_le16_to_cpu(eh->eh_entries); in ext2fs_extent_node_split()
906 tocopy = ext2fs_le16_to_cpu(eh->eh_entries) / 2; in ext2fs_extent_node_split()
911 tocopy, ext2fs_le16_to_cpu(eh->eh_entries), in ext2fs_extent_node_split()
951 memcpy(neweh, eh, sizeof(struct ext3_extent_header)); in ext2fs_extent_node_split()
959 EXT_FIRST_INDEX(eh) + in ext2fs_extent_node_split()
960 (ext2fs_le16_to_cpu(eh->eh_entries) - tocopy), in ext2fs_extent_node_split()
984 eh->eh_depth = ext2fs_cpu_to_le16(handle->max_depth); in ext2fs_extent_node_split()
990 eh->eh_entries = ext2fs_cpu_to_le16(path->entries); in ext2fs_extent_node_split()
1054 struct ext3_extent_header *eh; in ext2fs_extent_insert() local
1087 eh = (struct ext3_extent_header *) path->buf; in ext2fs_extent_insert()
1095 ix = EXT_FIRST_INDEX(eh); in ext2fs_extent_insert()
1105 eh = (struct ext3_extent_header *) path->buf; in ext2fs_extent_insert()
1106 eh->eh_entries = ext2fs_cpu_to_le16(path->entries); in ext2fs_extent_insert()
1462 struct ext3_extent_header *eh; in ext2fs_extent_delete() local
1524 eh = (struct ext3_extent_header *) path->buf; in ext2fs_extent_delete()
1525 eh->eh_entries = ext2fs_cpu_to_le16(path->entries); in ext2fs_extent_delete()
1527 eh->eh_depth = handle->max_depth = 0; in ext2fs_extent_delete()