• Home
  • Raw
  • Download

Lines Matching refs:ei

22 static void __set_extent_info(struct extent_info *ei,  in __set_extent_info()  argument
28 ei->fofs = fofs; in __set_extent_info()
29 ei->len = len; in __set_extent_info()
32 ei->blk = blk; in __set_extent_info()
36 ei->c_len = 0; in __set_extent_info()
39 ei->age = age; in __set_extent_info()
40 ei->last_blocks = last_blocks; in __set_extent_info()
87 if (en->ei.len <= et->largest.len) in __try_update_largest_extent()
90 et->largest = en->ei; in __try_update_largest_extent()
345 struct extent_tree *et, struct extent_info *ei, in __attach_extent_node() argument
356 en->ei = *ei; in __attach_extent_node()
469 struct extent_info ei; in f2fs_init_read_extent_tree() local
486 get_read_extent_info(&ei, i_ext); in f2fs_init_read_extent_tree()
492 en = __attach_extent_node(sbi, et, &ei, NULL, in f2fs_init_read_extent_tree()
495 et->largest = en->ei; in f2fs_init_read_extent_tree()
528 struct extent_info *ei, enum extent_type type) in __lookup_extent_tree() argument
546 *ei = et->largest; in __lookup_extent_tree()
562 *ei = en->ei; in __lookup_extent_tree()
575 trace_f2fs_lookup_read_extent_tree_end(inode, pgofs, ei); in __lookup_extent_tree()
577 trace_f2fs_lookup_age_extent_tree_end(inode, pgofs, ei); in __lookup_extent_tree()
582 struct extent_tree *et, struct extent_info *ei, in __try_merge_extent_node() argument
589 if (prev_ex && __is_back_mergeable(ei, &prev_ex->ei, et->type)) { in __try_merge_extent_node()
590 prev_ex->ei.len += ei->len; in __try_merge_extent_node()
591 ei = &prev_ex->ei; in __try_merge_extent_node()
595 if (next_ex && __is_front_mergeable(ei, &next_ex->ei, et->type)) { in __try_merge_extent_node()
596 next_ex->ei.fofs = ei->fofs; in __try_merge_extent_node()
597 next_ex->ei.len += ei->len; in __try_merge_extent_node()
599 next_ex->ei.blk = ei->blk; in __try_merge_extent_node()
621 struct extent_tree *et, struct extent_info *ei, in __insert_extent_tree() argument
640 ei->fofs, &leftmost); in __insert_extent_tree()
642 en = __attach_extent_node(sbi, et, ei, parent, p, leftmost); in __insert_extent_tree()
663 struct extent_info ei, dei, prev; in __update_extent_tree_range() local
709 while (en && en->ei.fofs < end) { in __update_extent_tree_range()
715 dei = en->ei; in __update_extent_tree_range()
721 en->ei.len = fofs - en->ei.fofs; in __update_extent_tree_range()
729 __set_extent_info(&ei, in __update_extent_tree_range()
734 en1 = __insert_extent_tree(sbi, et, &ei, in __update_extent_tree_range()
738 __set_extent_info(&en->ei, in __update_extent_tree_range()
739 end, en->ei.len - (end - dei.fofs), in __update_extent_tree_range()
740 en->ei.blk + (end - dei.fofs), true, in __update_extent_tree_range()
779 __set_extent_info(&ei, fofs, len, tei->blk, false, in __update_extent_tree_range()
781 if (!__try_merge_extent_node(sbi, et, &ei, prev_en, next_en)) in __update_extent_tree_range()
782 __insert_extent_tree(sbi, et, &ei, in __update_extent_tree_range()
807 __set_extent_info(&ei, fofs, len, 0, false, in __update_extent_tree_range()
809 if (!__try_merge_extent_node(sbi, et, &ei, prev_en, next_en)) in __update_extent_tree_range()
810 __insert_extent_tree(sbi, et, &ei, in __update_extent_tree_range()
828 struct extent_info ei; in f2fs_update_read_extent_tree_range_compressed() local
850 __set_extent_info(&ei, fofs, llen, blkaddr, true, 0, 0, EX_READ); in f2fs_update_read_extent_tree_range_compressed()
851 ei.c_len = c_len; in f2fs_update_read_extent_tree_range_compressed()
853 if (!__try_merge_extent_node(sbi, et, &ei, prev_en, next_en)) in f2fs_update_read_extent_tree_range_compressed()
854 __insert_extent_tree(sbi, et, &ei, in f2fs_update_read_extent_tree_range_compressed()
881 static int __get_new_block_age(struct inode *inode, struct extent_info *ei, in __get_new_block_age() argument
888 struct extent_info tei = *ei; /* only fofs and len are valid */ in __get_new_block_age()
895 if ((f_size >> PAGE_SHIFT) == ei->fofs && f_size & (PAGE_SIZE - 1) && in __get_new_block_age()
899 if (__lookup_extent_tree(inode, ei->fofs, &tei, EX_BLOCK_AGE)) { in __get_new_block_age()
909 ei->age = __calculate_block_age(sbi, cur_age, tei.age); in __get_new_block_age()
911 ei->age = cur_age; in __get_new_block_age()
912 ei->last_blocks = cur_blocks; in __get_new_block_age()
913 WARN_ON(ei->age > cur_blocks); in __get_new_block_age()
933 ei->age = 0; in __get_new_block_age()
934 ei->last_blocks = cur_blocks; in __get_new_block_age()
940 struct extent_info ei = {}; in __update_extent_cache() local
945 ei.fofs = f2fs_start_bidx_of_node(ofs_of_node(dn->node_page), dn->inode) + in __update_extent_cache()
947 ei.len = 1; in __update_extent_cache()
951 ei.blk = NULL_ADDR; in __update_extent_cache()
953 ei.blk = dn->data_blkaddr; in __update_extent_cache()
955 if (__get_new_block_age(dn->inode, &ei, dn->data_blkaddr)) in __update_extent_cache()
958 __update_extent_tree_range(dn->inode, &ei, type); in __update_extent_cache()
1038 struct extent_info *ei) in f2fs_lookup_read_extent_cache() argument
1043 return __lookup_extent_tree(inode, pgofs, ei, EX_READ); in f2fs_lookup_read_extent_cache()
1054 struct extent_info ei = { in f2fs_update_read_extent_cache_range() local
1063 __update_extent_tree_range(dn->inode, &ei, EX_READ); in f2fs_update_read_extent_cache_range()
1076 struct extent_info *ei) in f2fs_lookup_age_extent_cache() argument
1081 return __lookup_extent_tree(inode, pgofs, ei, EX_BLOCK_AGE); in f2fs_lookup_age_extent_cache()
1092 struct extent_info ei = { in f2fs_update_age_extent_cache_range() local
1100 __update_extent_tree_range(dn->inode, &ei, EX_BLOCK_AGE); in f2fs_update_age_extent_cache_range()