• Home
  • Raw
  • Download

Lines Matching refs:ei

27 	struct extent_info *ei;  in sanity_check_extent_cache()  local
32 ei = &et->largest; in sanity_check_extent_cache()
33 if (!ei->len) in sanity_check_extent_cache()
38 ei->len = 0; in sanity_check_extent_cache()
43 if (!f2fs_is_valid_blkaddr(sbi, ei->blk, DATA_GENERIC_ENHANCE) || in sanity_check_extent_cache()
44 !f2fs_is_valid_blkaddr(sbi, ei->blk + ei->len - 1, in sanity_check_extent_cache()
49 ei->blk, ei->fofs, ei->len); in sanity_check_extent_cache()
55 static void __set_extent_info(struct extent_info *ei, in __set_extent_info() argument
61 ei->fofs = fofs; in __set_extent_info()
62 ei->len = len; in __set_extent_info()
65 ei->blk = blk; in __set_extent_info()
69 ei->c_len = 0; in __set_extent_info()
72 ei->age = age; in __set_extent_info()
73 ei->last_blocks = last_blocks; in __set_extent_info()
120 if (en->ei.len <= et->largest.len) in __try_update_largest_extent()
123 et->largest = en->ei; in __try_update_largest_extent()
167 if (cached_en && cached_en->ei.fofs <= fofs && in __lookup_extent_node()
168 cached_en->ei.fofs + cached_en->ei.len > fofs) in __lookup_extent_node()
175 if (fofs < en->ei.fofs) in __lookup_extent_node()
177 else if (fofs >= en->ei.fofs + en->ei.len) in __lookup_extent_node()
215 if (en && en->ei.fofs <= fofs && en->ei.fofs + en->ei.len > fofs) in __lookup_extent_node_ret()
224 if (fofs < en->ei.fofs) { in __lookup_extent_node_ret()
226 } else if (fofs >= en->ei.fofs + en->ei.len) { in __lookup_extent_node_ret()
239 if (parent && fofs > en->ei.fofs) in __lookup_extent_node_ret()
244 if (parent && fofs < en->ei.fofs) in __lookup_extent_node_ret()
250 if (fofs == en->ei.fofs) { in __lookup_extent_node_ret()
256 if (fofs == en->ei.fofs + en->ei.len - 1) { in __lookup_extent_node_ret()
269 struct extent_tree *et, struct extent_info *ei, in __attach_extent_node() argument
280 en->ei = *ei; in __attach_extent_node()
394 struct extent_info ei; in f2fs_init_read_extent_tree() local
411 get_read_extent_info(&ei, i_ext); in f2fs_init_read_extent_tree()
417 en = __attach_extent_node(sbi, et, &ei, NULL, in f2fs_init_read_extent_tree()
420 et->largest = en->ei; in f2fs_init_read_extent_tree()
453 struct extent_info *ei, enum extent_type type) in __lookup_extent_tree() argument
471 *ei = et->largest; in __lookup_extent_tree()
486 *ei = en->ei; in __lookup_extent_tree()
499 trace_f2fs_lookup_read_extent_tree_end(inode, pgofs, ei); in __lookup_extent_tree()
501 trace_f2fs_lookup_age_extent_tree_end(inode, pgofs, ei); in __lookup_extent_tree()
506 struct extent_tree *et, struct extent_info *ei, in __try_merge_extent_node() argument
513 if (prev_ex && __is_back_mergeable(ei, &prev_ex->ei, et->type)) { in __try_merge_extent_node()
514 prev_ex->ei.len += ei->len; in __try_merge_extent_node()
515 ei = &prev_ex->ei; in __try_merge_extent_node()
519 if (next_ex && __is_front_mergeable(ei, &next_ex->ei, et->type)) { in __try_merge_extent_node()
520 next_ex->ei.fofs = ei->fofs; in __try_merge_extent_node()
521 next_ex->ei.len += ei->len; in __try_merge_extent_node()
523 next_ex->ei.blk = ei->blk; in __try_merge_extent_node()
545 struct extent_tree *et, struct extent_info *ei, in __insert_extent_tree() argument
568 if (ei->fofs < en->ei.fofs) { in __insert_extent_tree()
570 } else if (ei->fofs >= en->ei.fofs + en->ei.len) { in __insert_extent_tree()
579 en = __attach_extent_node(sbi, et, ei, parent, p, leftmost); in __insert_extent_tree()
600 struct extent_info ei, dei, prev; in __update_extent_tree_range() local
645 while (en && en->ei.fofs < end) { in __update_extent_tree_range()
651 dei = en->ei; in __update_extent_tree_range()
657 en->ei.len = fofs - en->ei.fofs; in __update_extent_tree_range()
665 __set_extent_info(&ei, in __update_extent_tree_range()
670 en1 = __insert_extent_tree(sbi, et, &ei, in __update_extent_tree_range()
674 __set_extent_info(&en->ei, in __update_extent_tree_range()
675 end, en->ei.len - (end - dei.fofs), in __update_extent_tree_range()
676 en->ei.blk + (end - dei.fofs), true, in __update_extent_tree_range()
715 __set_extent_info(&ei, fofs, len, tei->blk, false, in __update_extent_tree_range()
717 if (!__try_merge_extent_node(sbi, et, &ei, prev_en, next_en)) in __update_extent_tree_range()
718 __insert_extent_tree(sbi, et, &ei, in __update_extent_tree_range()
743 __set_extent_info(&ei, fofs, len, 0, false, in __update_extent_tree_range()
745 if (!__try_merge_extent_node(sbi, et, &ei, prev_en, next_en)) in __update_extent_tree_range()
746 __insert_extent_tree(sbi, et, &ei, in __update_extent_tree_range()
764 struct extent_info ei; in f2fs_update_read_extent_tree_range_compressed() local
785 __set_extent_info(&ei, fofs, llen, blkaddr, true, 0, 0, EX_READ); in f2fs_update_read_extent_tree_range_compressed()
786 ei.c_len = c_len; in f2fs_update_read_extent_tree_range_compressed()
788 if (!__try_merge_extent_node(sbi, et, &ei, prev_en, next_en)) in f2fs_update_read_extent_tree_range_compressed()
789 __insert_extent_tree(sbi, et, &ei, in f2fs_update_read_extent_tree_range_compressed()
816 static int __get_new_block_age(struct inode *inode, struct extent_info *ei, in __get_new_block_age() argument
823 struct extent_info tei = *ei; /* only fofs and len are valid */ in __get_new_block_age()
830 if ((f_size >> PAGE_SHIFT) == ei->fofs && f_size & (PAGE_SIZE - 1) && in __get_new_block_age()
834 if (__lookup_extent_tree(inode, ei->fofs, &tei, EX_BLOCK_AGE)) { in __get_new_block_age()
844 ei->age = __calculate_block_age(sbi, cur_age, tei.age); in __get_new_block_age()
846 ei->age = cur_age; in __get_new_block_age()
847 ei->last_blocks = cur_blocks; in __get_new_block_age()
848 WARN_ON(ei->age > cur_blocks); in __get_new_block_age()
868 ei->age = 0; in __get_new_block_age()
869 ei->last_blocks = cur_blocks; in __get_new_block_age()
875 struct extent_info ei = {}; in __update_extent_cache() local
880 ei.fofs = f2fs_start_bidx_of_node(ofs_of_node(dn->node_page), dn->inode) + in __update_extent_cache()
882 ei.len = 1; in __update_extent_cache()
886 ei.blk = NULL_ADDR; in __update_extent_cache()
888 ei.blk = dn->data_blkaddr; in __update_extent_cache()
890 if (__get_new_block_age(dn->inode, &ei, dn->data_blkaddr)) in __update_extent_cache()
893 __update_extent_tree_range(dn->inode, &ei, type); in __update_extent_cache()
973 struct extent_info *ei) in f2fs_lookup_read_extent_cache() argument
978 return __lookup_extent_tree(inode, pgofs, ei, EX_READ); in f2fs_lookup_read_extent_cache()
984 struct extent_info ei = {}; in f2fs_lookup_read_extent_cache_block() local
986 if (!f2fs_lookup_read_extent_cache(inode, index, &ei)) in f2fs_lookup_read_extent_cache_block()
988 *blkaddr = ei.blk + index - ei.fofs; in f2fs_lookup_read_extent_cache_block()
1000 struct extent_info ei = { in f2fs_update_read_extent_cache_range() local
1009 __update_extent_tree_range(dn->inode, &ei, EX_READ); in f2fs_update_read_extent_cache_range()
1022 struct extent_info *ei) in f2fs_lookup_age_extent_cache() argument
1027 return __lookup_extent_tree(inode, pgofs, ei, EX_BLOCK_AGE); in f2fs_lookup_age_extent_cache()
1038 struct extent_info ei = { in f2fs_update_age_extent_cache_range() local
1046 __update_extent_tree_range(dn->inode, &ei, EX_BLOCK_AGE); in f2fs_update_age_extent_cache_range()