• Home
  • Raw
  • Download

Lines Matching full:en

240 	struct extent_node *en;  in __attach_extent_node()  local
242 en = kmem_cache_alloc(extent_node_slab, GFP_ATOMIC); in __attach_extent_node()
243 if (!en) in __attach_extent_node()
246 en->ei = *ei; in __attach_extent_node()
247 INIT_LIST_HEAD(&en->list); in __attach_extent_node()
248 en->et = et; in __attach_extent_node()
250 rb_link_node(&en->rb_node, parent, p); in __attach_extent_node()
251 rb_insert_color_cached(&en->rb_node, &et->root, leftmost); in __attach_extent_node()
254 return en; in __attach_extent_node()
258 struct extent_tree *et, struct extent_node *en) in __detach_extent_node() argument
260 rb_erase_cached(&en->rb_node, &et->root); in __detach_extent_node()
264 if (et->cached_en == en) in __detach_extent_node()
266 kmem_cache_free(extent_node_slab, en); in __detach_extent_node()
276 struct extent_tree *et, struct extent_node *en) in __release_extent_node() argument
279 f2fs_bug_on(sbi, list_empty(&en->list)); in __release_extent_node()
280 list_del_init(&en->list); in __release_extent_node()
283 __detach_extent_node(sbi, et, en); in __release_extent_node()
321 struct extent_node *en; in __init_extent_tree() local
323 en = __attach_extent_node(sbi, et, ei, NULL, p, true); in __init_extent_tree()
324 if (!en) in __init_extent_tree()
327 et->largest = en->ei; in __init_extent_tree()
328 et->cached_en = en; in __init_extent_tree()
329 return en; in __init_extent_tree()
336 struct extent_node *en; in __free_extent_tree() local
342 en = rb_entry(node, struct extent_node, rb_node); in __free_extent_tree()
343 __release_extent_node(sbi, et, en); in __free_extent_tree()
366 struct extent_node *en; in __f2fs_init_extent_tree() local
391 en = __init_extent_tree(sbi, et, &ei); in __f2fs_init_extent_tree()
392 if (en) { in __f2fs_init_extent_tree()
394 list_add_tail(&en->list, &sbi->extent_list); in __f2fs_init_extent_tree()
414 struct extent_node *en; in f2fs_lookup_extent_tree() local
432 en = (struct extent_node *)f2fs_lookup_rb_tree(&et->root, in f2fs_lookup_extent_tree()
434 if (!en) in f2fs_lookup_extent_tree()
437 if (en == et->cached_en) in f2fs_lookup_extent_tree()
442 *ei = en->ei; in f2fs_lookup_extent_tree()
444 if (!list_empty(&en->list)) { in f2fs_lookup_extent_tree()
445 list_move_tail(&en->list, &sbi->extent_list); in f2fs_lookup_extent_tree()
446 et->cached_en = en; in f2fs_lookup_extent_tree()
463 struct extent_node *en = NULL; in __try_merge_extent_node() local
468 en = prev_ex; in __try_merge_extent_node()
475 if (en) in __try_merge_extent_node()
478 en = next_ex; in __try_merge_extent_node()
481 if (!en) in __try_merge_extent_node()
484 __try_update_largest_extent(et, en); in __try_merge_extent_node()
487 if (!list_empty(&en->list)) { in __try_merge_extent_node()
488 list_move_tail(&en->list, &sbi->extent_list); in __try_merge_extent_node()
489 et->cached_en = en; in __try_merge_extent_node()
492 return en; in __try_merge_extent_node()
503 struct extent_node *en = NULL; in __insert_extent_tree() local
516 en = __attach_extent_node(sbi, et, ei, parent, p, leftmost); in __insert_extent_tree()
517 if (!en) in __insert_extent_tree()
520 __try_update_largest_extent(et, en); in __insert_extent_tree()
524 list_add_tail(&en->list, &sbi->extent_list); in __insert_extent_tree()
525 et->cached_en = en; in __insert_extent_tree()
527 return en; in __insert_extent_tree()
535 struct extent_node *en = NULL, *en1 = NULL; in f2fs_update_extent_tree_range() local
566 en = (struct extent_node *)f2fs_lookup_rb_tree_ret(&et->root, in f2fs_update_extent_tree_range()
572 if (!en) in f2fs_update_extent_tree_range()
573 en = next_en; in f2fs_update_extent_tree_range()
576 while (en && en->ei.fofs < end) { in f2fs_update_extent_tree_range()
582 dei = en->ei; in f2fs_update_extent_tree_range()
587 en->ei.len = pos - en->ei.fofs; in f2fs_update_extent_tree_range()
588 prev_en = en; in f2fs_update_extent_tree_range()
601 en->ei.fofs = end; in f2fs_update_extent_tree_range()
602 en->ei.blk += end - dei.fofs; in f2fs_update_extent_tree_range()
603 en->ei.len -= end - dei.fofs; in f2fs_update_extent_tree_range()
604 next_en = en; in f2fs_update_extent_tree_range()
610 struct rb_node *node = rb_next(&en->rb_node); in f2fs_update_extent_tree_range()
617 __try_update_largest_extent(et, en); in f2fs_update_extent_tree_range()
619 __release_extent_node(sbi, et, en); in f2fs_update_extent_tree_range()
630 en = next_en; in f2fs_update_extent_tree_range()
668 struct extent_node *en; in f2fs_shrink_extent_tree() local
713 en = list_first_entry(&sbi->extent_list, in f2fs_shrink_extent_tree()
715 et = en->et; in f2fs_shrink_extent_tree()
718 list_move_tail(&en->list, &sbi->extent_list); in f2fs_shrink_extent_tree()
722 list_del_init(&en->list); in f2fs_shrink_extent_tree()
725 __detach_extent_node(sbi, et, en); in f2fs_shrink_extent_tree()