• Home
  • Raw
  • Download

Lines Matching refs: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()
369 struct ext4_extent_header *eh, in ext4_valid_extent_entries() argument
377 if (eh->eh_entries == 0) in ext4_valid_extent_entries()
380 entries = le16_to_cpu(eh->eh_entries); in ext4_valid_extent_entries()
384 struct ext4_extent *ext = EXT_FIRST_EXTENT(eh); in ext4_valid_extent_entries()
408 struct ext4_extent_idx *ext_idx = EXT_FIRST_INDEX(eh); in ext4_valid_extent_entries()
436 struct inode *inode, struct ext4_extent_header *eh, in __ext4_ext_check() argument
442 if (unlikely(eh->eh_magic != EXT4_EXT_MAGIC)) { in __ext4_ext_check()
446 if (unlikely(le16_to_cpu(eh->eh_depth) != depth)) { in __ext4_ext_check()
450 if (unlikely(eh->eh_max == 0)) { in __ext4_ext_check()
455 if (unlikely(le16_to_cpu(eh->eh_max) > max)) { in __ext4_ext_check()
459 if (unlikely(le16_to_cpu(eh->eh_entries) > le16_to_cpu(eh->eh_max))) { in __ext4_ext_check()
463 if (unlikely((eh->eh_entries == 0) && (depth > 0))) { in __ext4_ext_check()
467 if (!ext4_valid_extent_entries(inode, eh, lblk, &pblk, depth)) { in __ext4_ext_check()
477 !ext4_extent_block_csum_verify(inode, eh)) { in __ext4_ext_check()
489 le16_to_cpu(eh->eh_magic), in __ext4_ext_check()
490 le16_to_cpu(eh->eh_entries), in __ext4_ext_check()
491 le16_to_cpu(eh->eh_max), in __ext4_ext_check()
492 max, le16_to_cpu(eh->eh_depth), depth); in __ext4_ext_check()
496 #define ext4_ext_check(inode, eh, depth, pblk) \ argument
497 __ext4_ext_check(__func__, __LINE__, (inode), (eh), (depth), (pblk), 0)
505 struct ext4_extent_header *eh) in ext4_cache_extents() argument
507 struct ext4_extent *ex = EXT_FIRST_EXTENT(eh); in ext4_cache_extents()
511 for (i = le16_to_cpu(eh->eh_entries); i > 0; i--, ex++) { in ext4_cache_extents()
563 struct ext4_extent_header *eh = ext_block_hdr(bh); in __read_extent_tree_block() local
564 ext4_cache_extents(inode, eh); in __read_extent_tree_block()
670 struct ext4_extent_header *eh; in ext4_ext_show_leaf() local
677 eh = path[depth].p_hdr; in ext4_ext_show_leaf()
678 ex = EXT_FIRST_EXTENT(eh); in ext4_ext_show_leaf()
682 for (i = 0; i < le16_to_cpu(eh->eh_entries); i++, ex++) { in ext4_ext_show_leaf()
749 struct ext4_extent_header *eh = path->p_hdr; in ext4_ext_binsearch_idx() local
755 l = EXT_FIRST_INDEX(eh) + 1; in ext4_ext_binsearch_idx()
756 r = EXT_LAST_INDEX(eh); in ext4_ext_binsearch_idx()
777 chix = ix = EXT_FIRST_INDEX(eh); in ext4_ext_binsearch_idx()
778 for (k = 0; k < le16_to_cpu(eh->eh_entries); k++, ix++) { in ext4_ext_binsearch_idx()
783 ix, EXT_FIRST_INDEX(eh)); in ext4_ext_binsearch_idx()
809 struct ext4_extent_header *eh = path->p_hdr; in ext4_ext_binsearch() local
812 if (eh->eh_entries == 0) { in ext4_ext_binsearch()
822 l = EXT_FIRST_EXTENT(eh) + 1; in ext4_ext_binsearch()
823 r = EXT_LAST_EXTENT(eh); in ext4_ext_binsearch()
848 chex = ex = EXT_FIRST_EXTENT(eh); in ext4_ext_binsearch()
849 for (k = 0; k < le16_to_cpu(eh->eh_entries); k++, ex++) { in ext4_ext_binsearch()
864 struct ext4_extent_header *eh; in ext4_ext_tree_init() local
866 eh = ext_inode_hdr(inode); in ext4_ext_tree_init()
867 eh->eh_depth = 0; in ext4_ext_tree_init()
868 eh->eh_entries = 0; in ext4_ext_tree_init()
869 eh->eh_magic = EXT4_EXT_MAGIC; in ext4_ext_tree_init()
870 eh->eh_max = cpu_to_le16(ext4_ext_space_root(inode, 0)); in ext4_ext_tree_init()
871 eh->eh_generation = 0; in ext4_ext_tree_init()
879 struct ext4_extent_header *eh; in ext4_find_extent() local
889 eh = ext_inode_hdr(inode); in ext4_find_extent()
913 path[0].p_hdr = eh; in ext4_find_extent()
918 ext4_cache_extents(inode, eh); in ext4_find_extent()
922 ppos, le16_to_cpu(eh->eh_entries), le16_to_cpu(eh->eh_max)); in ext4_find_extent()
935 eh = ext_block_hdr(bh); in ext4_find_extent()
938 path[ppos].p_hdr = eh; in ext4_find_extent()
1535 struct ext4_extent_header *eh; in ext4_ext_search_right() local
1609 eh = ext_block_hdr(bh); in ext4_ext_search_right()
1610 ix = EXT_FIRST_INDEX(eh); in ext4_ext_search_right()
1617 eh = ext_block_hdr(bh); in ext4_ext_search_right()
1618 ex = EXT_FIRST_EXTENT(eh); in ext4_ext_search_right()
1703 struct ext4_extent_header *eh; in ext4_ext_correct_indexes() local
1709 eh = path[depth].p_hdr; in ext4_ext_correct_indexes()
1712 if (unlikely(ex == NULL || eh == NULL)) { in ext4_ext_correct_indexes()
1714 "ex %p == NULL or eh %p == NULL", ex, eh); in ext4_ext_correct_indexes()
1723 if (ex != EXT_FIRST_EXTENT(eh)) { in ext4_ext_correct_indexes()
1800 struct ext4_extent_header *eh; in ext4_ext_try_to_merge_right() local
1806 eh = path[depth].p_hdr; in ext4_ext_try_to_merge_right()
1808 while (ex < EXT_LAST_EXTENT(eh)) { in ext4_ext_try_to_merge_right()
1818 if (ex + 1 < EXT_LAST_EXTENT(eh)) { in ext4_ext_try_to_merge_right()
1819 len = (EXT_LAST_EXTENT(eh) - ex - 1) in ext4_ext_try_to_merge_right()
1823 le16_add_cpu(&eh->eh_entries, -1); in ext4_ext_try_to_merge_right()
1825 WARN_ON(eh->eh_entries == 0); in ext4_ext_try_to_merge_right()
1826 if (!eh->eh_entries) in ext4_ext_try_to_merge_right()
1888 struct ext4_extent_header *eh; in ext4_ext_try_to_merge() local
1894 eh = path[depth].p_hdr; in ext4_ext_try_to_merge()
1896 if (ex > EXT_FIRST_EXTENT(eh)) in ext4_ext_try_to_merge()
1967 struct ext4_extent_header *eh; in ext4_ext_insert_extent() local
1983 eh = path[depth].p_hdr; in ext4_ext_insert_extent()
1999 if (ex < EXT_LAST_EXTENT(eh) && in ext4_ext_insert_extent()
2005 } else if ((ex > EXT_FIRST_EXTENT(eh)) && in ext4_ext_insert_extent()
2030 eh = path[depth].p_hdr; in ext4_ext_insert_extent()
2059 eh = path[depth].p_hdr; in ext4_ext_insert_extent()
2066 eh = path[depth].p_hdr; in ext4_ext_insert_extent()
2067 if (le16_to_cpu(eh->eh_entries) < le16_to_cpu(eh->eh_max)) in ext4_ext_insert_extent()
2071 fex = EXT_LAST_EXTENT(eh); in ext4_ext_insert_extent()
2082 eh = npath[depth].p_hdr; in ext4_ext_insert_extent()
2083 if (le16_to_cpu(eh->eh_entries) < le16_to_cpu(eh->eh_max)) { in ext4_ext_insert_extent()
2085 le16_to_cpu(eh->eh_entries)); in ext4_ext_insert_extent()
2090 le16_to_cpu(eh->eh_entries), le16_to_cpu(eh->eh_max)); in ext4_ext_insert_extent()
2104 eh = path[depth].p_hdr; in ext4_ext_insert_extent()
2120 nearex = EXT_FIRST_EXTENT(eh); in ext4_ext_insert_extent()
2144 len = EXT_LAST_EXTENT(eh) - nearex + 1; in ext4_ext_insert_extent()
2158 le16_add_cpu(&eh->eh_entries, 1); in ext4_ext_insert_extent()
2596 struct ext4_extent_header *eh; in ext4_ext_rm_leaf() local
2609 eh = path[depth].p_hdr; in ext4_ext_rm_leaf()
2617 ex = EXT_LAST_EXTENT(eh); in ext4_ext_rm_leaf()
2624 while (ex >= EXT_FIRST_EXTENT(eh) && in ext4_ext_rm_leaf()
2682 if (ex == EXT_FIRST_EXTENT(eh)) { in ext4_ext_rm_leaf()
2735 memmove(ex, ex+1, (EXT_LAST_EXTENT(eh) - ex) * in ext4_ext_rm_leaf()
2739 memset(EXT_LAST_EXTENT(eh), 0, in ext4_ext_rm_leaf()
2742 le16_add_cpu(&eh->eh_entries, -1); in ext4_ext_rm_leaf()
2756 if (correct_index && eh->eh_entries) in ext4_ext_rm_leaf()
2766 if (partial->state == tofree && ex >= EXT_FIRST_EXTENT(eh)) { in ext4_ext_rm_leaf()
2784 if (err == 0 && eh->eh_entries == 0 && path[depth].p_bh != NULL) in ext4_ext_rm_leaf()
3424 struct ext4_extent_header *eh; in ext4_ext_convert_to_initialized() local
3444 eh = path[depth].p_hdr; in ext4_ext_convert_to_initialized()
3475 (ex > EXT_FIRST_EXTENT(eh))) { /*L2*/ in ext4_ext_convert_to_initialized()
3520 ex < EXT_LAST_EXTENT(eh)) { /*L2*/ in ext4_ext_convert_to_initialized()