Lines Matching full:eh

50 				     struct ext4_extent_header *eh)  in ext4_extent_block_csum()  argument
56 csum = ext4_chksum(sbi, ei->i_csum_seed, (__u8 *)eh, in ext4_extent_block_csum()
57 EXT4_EXTENT_TAIL_OFFSET(eh)); in ext4_extent_block_csum()
62 struct ext4_extent_header *eh) in ext4_extent_block_csum_verify() argument
69 et = find_ext4_extent_tail(eh); in ext4_extent_block_csum_verify()
70 if (et->et_checksum != ext4_extent_block_csum(inode, eh)) in ext4_extent_block_csum_verify()
76 struct ext4_extent_header *eh) in ext4_extent_block_csum_set() argument
83 et = find_ext4_extent_tail(eh); in ext4_extent_block_csum_set()
84 et->et_checksum = ext4_extent_block_csum(inode, eh); in ext4_extent_block_csum_set()
388 struct ext4_extent_header *eh, in ext4_valid_extent_entries() argument
396 if (eh->eh_entries == 0) in ext4_valid_extent_entries()
399 entries = le16_to_cpu(eh->eh_entries); in ext4_valid_extent_entries()
403 struct ext4_extent *ext = EXT_FIRST_EXTENT(eh); in ext4_valid_extent_entries()
427 struct ext4_extent_idx *ext_idx = EXT_FIRST_INDEX(eh); in ext4_valid_extent_entries()
455 struct inode *inode, struct ext4_extent_header *eh, in __ext4_ext_check() argument
461 if (unlikely(eh->eh_magic != EXT4_EXT_MAGIC)) { in __ext4_ext_check()
465 if (unlikely(le16_to_cpu(eh->eh_depth) != depth)) { in __ext4_ext_check()
469 if (unlikely(eh->eh_max == 0)) { in __ext4_ext_check()
474 if (unlikely(le16_to_cpu(eh->eh_max) > max)) { in __ext4_ext_check()
478 if (unlikely(le16_to_cpu(eh->eh_entries) > le16_to_cpu(eh->eh_max))) { in __ext4_ext_check()
482 if (unlikely((eh->eh_entries == 0) && (depth > 0))) { in __ext4_ext_check()
486 if (!ext4_valid_extent_entries(inode, eh, lblk, &pblk, depth)) { in __ext4_ext_check()
496 !ext4_extent_block_csum_verify(inode, eh)) { in __ext4_ext_check()
508 le16_to_cpu(eh->eh_magic), in __ext4_ext_check()
509 le16_to_cpu(eh->eh_entries), in __ext4_ext_check()
510 le16_to_cpu(eh->eh_max), in __ext4_ext_check()
511 max, le16_to_cpu(eh->eh_depth), depth); in __ext4_ext_check()
515 #define ext4_ext_check(inode, eh, depth, pblk) \ argument
516 __ext4_ext_check(__func__, __LINE__, (inode), (eh), (depth), (pblk), 0)
524 struct ext4_extent_header *eh) in ext4_cache_extents() argument
526 struct ext4_extent *ex = EXT_FIRST_EXTENT(eh); in ext4_cache_extents()
530 for (i = le16_to_cpu(eh->eh_entries); i > 0; i--, ex++) { in ext4_cache_extents()
582 struct ext4_extent_header *eh = ext_block_hdr(bh); in __read_extent_tree_block() local
583 ext4_cache_extents(inode, eh); in __read_extent_tree_block()
688 struct ext4_extent_header *eh; in ext4_ext_show_leaf() local
695 eh = path[depth].p_hdr; in ext4_ext_show_leaf()
696 ex = EXT_FIRST_EXTENT(eh); in ext4_ext_show_leaf()
700 for (i = 0; i < le16_to_cpu(eh->eh_entries); i++, ex++) { in ext4_ext_show_leaf()
754 struct ext4_extent_header *eh = path->p_hdr; in ext4_ext_binsearch_idx() local
760 l = EXT_FIRST_INDEX(eh) + 1; in ext4_ext_binsearch_idx()
761 r = EXT_LAST_INDEX(eh); in ext4_ext_binsearch_idx()
783 chix = ix = EXT_FIRST_INDEX(eh); in ext4_ext_binsearch_idx()
784 for (k = 0; k < le16_to_cpu(eh->eh_entries); k++, ix++) { in ext4_ext_binsearch_idx()
789 ix, EXT_FIRST_INDEX(eh)); in ext4_ext_binsearch_idx()
815 struct ext4_extent_header *eh = path->p_hdr; in ext4_ext_binsearch() local
818 if (eh->eh_entries == 0) { in ext4_ext_binsearch()
828 l = EXT_FIRST_EXTENT(eh) + 1; in ext4_ext_binsearch()
829 r = EXT_LAST_EXTENT(eh); in ext4_ext_binsearch()
855 chex = ex = EXT_FIRST_EXTENT(eh); in ext4_ext_binsearch()
856 for (k = 0; k < le16_to_cpu(eh->eh_entries); k++, ex++) { in ext4_ext_binsearch()
871 struct ext4_extent_header *eh; in ext4_ext_tree_init() local
873 eh = ext_inode_hdr(inode); in ext4_ext_tree_init()
874 eh->eh_depth = 0; in ext4_ext_tree_init()
875 eh->eh_entries = 0; in ext4_ext_tree_init()
876 eh->eh_magic = EXT4_EXT_MAGIC; in ext4_ext_tree_init()
877 eh->eh_max = cpu_to_le16(ext4_ext_space_root(inode, 0)); in ext4_ext_tree_init()
878 eh->eh_generation = 0; in ext4_ext_tree_init()
886 struct ext4_extent_header *eh; in ext4_find_extent() local
896 eh = ext_inode_hdr(inode); in ext4_find_extent()
920 path[0].p_hdr = eh; in ext4_find_extent()
925 ext4_cache_extents(inode, eh); in ext4_find_extent()
929 ppos, le16_to_cpu(eh->eh_entries), le16_to_cpu(eh->eh_max)); in ext4_find_extent()
942 eh = ext_block_hdr(bh); in ext4_find_extent()
945 path[ppos].p_hdr = eh; in ext4_find_extent()
1542 struct ext4_extent_header *eh; in ext4_ext_search_right() local
1616 eh = ext_block_hdr(bh); in ext4_ext_search_right()
1617 ix = EXT_FIRST_INDEX(eh); in ext4_ext_search_right()
1624 eh = ext_block_hdr(bh); in ext4_ext_search_right()
1625 ex = EXT_FIRST_EXTENT(eh); in ext4_ext_search_right()
1710 struct ext4_extent_header *eh; in ext4_ext_correct_indexes() local
1716 eh = path[depth].p_hdr; in ext4_ext_correct_indexes()
1719 if (unlikely(ex == NULL || eh == NULL)) { in ext4_ext_correct_indexes()
1721 "ex %p == NULL or eh %p == NULL", ex, eh); in ext4_ext_correct_indexes()
1730 if (ex != EXT_FIRST_EXTENT(eh)) { in ext4_ext_correct_indexes()
1807 struct ext4_extent_header *eh; in ext4_ext_try_to_merge_right() local
1813 eh = path[depth].p_hdr; in ext4_ext_try_to_merge_right()
1815 while (ex < EXT_LAST_EXTENT(eh)) { in ext4_ext_try_to_merge_right()
1825 if (ex + 1 < EXT_LAST_EXTENT(eh)) { in ext4_ext_try_to_merge_right()
1826 len = (EXT_LAST_EXTENT(eh) - ex - 1) in ext4_ext_try_to_merge_right()
1830 le16_add_cpu(&eh->eh_entries, -1); in ext4_ext_try_to_merge_right()
1832 WARN_ON(eh->eh_entries == 0); in ext4_ext_try_to_merge_right()
1833 if (!eh->eh_entries) in ext4_ext_try_to_merge_right()
1834 EXT4_ERROR_INODE(inode, "eh->eh_entries = 0!"); in ext4_ext_try_to_merge_right()
1896 struct ext4_extent_header *eh; in ext4_ext_try_to_merge() local
1902 eh = path[depth].p_hdr; in ext4_ext_try_to_merge()
1904 if (ex > EXT_FIRST_EXTENT(eh)) in ext4_ext_try_to_merge()
1975 struct ext4_extent_header *eh; in ext4_ext_insert_extent() local
1991 eh = path[depth].p_hdr; in ext4_ext_insert_extent()
2007 if (ex < EXT_LAST_EXTENT(eh) && in ext4_ext_insert_extent()
2013 } else if ((ex > EXT_FIRST_EXTENT(eh)) && in ext4_ext_insert_extent()
2072 eh = path[depth].p_hdr; in ext4_ext_insert_extent()
2073 if (le16_to_cpu(eh->eh_entries) < le16_to_cpu(eh->eh_max)) in ext4_ext_insert_extent()
2077 fex = EXT_LAST_EXTENT(eh); in ext4_ext_insert_extent()
2088 eh = npath[depth].p_hdr; in ext4_ext_insert_extent()
2089 if (le16_to_cpu(eh->eh_entries) < le16_to_cpu(eh->eh_max)) { in ext4_ext_insert_extent()
2091 le16_to_cpu(eh->eh_entries)); in ext4_ext_insert_extent()
2096 le16_to_cpu(eh->eh_entries), le16_to_cpu(eh->eh_max)); in ext4_ext_insert_extent()
2111 eh = path[depth].p_hdr; in ext4_ext_insert_extent()
2127 nearex = EXT_FIRST_EXTENT(eh); in ext4_ext_insert_extent()
2151 len = EXT_LAST_EXTENT(eh) - nearex + 1; in ext4_ext_insert_extent()
2165 le16_add_cpu(&eh->eh_entries, 1); in ext4_ext_insert_extent()
2578 struct ext4_extent_header *eh; in ext4_ext_rm_leaf() local
2591 eh = path[depth].p_hdr; in ext4_ext_rm_leaf()
2599 ex = EXT_LAST_EXTENT(eh); in ext4_ext_rm_leaf()
2606 while (ex >= EXT_FIRST_EXTENT(eh) && in ext4_ext_rm_leaf()
2663 if (ex == EXT_FIRST_EXTENT(eh)) { in ext4_ext_rm_leaf()
2716 memmove(ex, ex+1, (EXT_LAST_EXTENT(eh) - ex) * in ext4_ext_rm_leaf()
2720 memset(EXT_LAST_EXTENT(eh), 0, in ext4_ext_rm_leaf()
2723 le16_add_cpu(&eh->eh_entries, -1); in ext4_ext_rm_leaf()
2737 if (correct_index && eh->eh_entries) in ext4_ext_rm_leaf()
2747 if (partial->state == tofree && ex >= EXT_FIRST_EXTENT(eh)) { in ext4_ext_rm_leaf()
2765 if (err == 0 && eh->eh_entries == 0 && path[depth].p_bh != NULL) in ext4_ext_rm_leaf()
3421 struct ext4_extent_header *eh; in ext4_ext_convert_to_initialized() local
3442 eh = path[depth].p_hdr; in ext4_ext_convert_to_initialized()
3473 (ex > EXT_FIRST_EXTENT(eh))) { /*L2*/ in ext4_ext_convert_to_initialized()
3518 ex < EXT_LAST_EXTENT(eh)) { /*L2*/ in ext4_ext_convert_to_initialized()