Lines Matching full:ne
184 struct nat_entry *ne, struct f2fs_nat_entry *raw_ne, bool no_fail) in __init_nat_entry() argument
187 f2fs_radix_tree_insert(&nm_i->nat_root, nat_get_nid(ne), ne); in __init_nat_entry()
188 else if (radix_tree_insert(&nm_i->nat_root, nat_get_nid(ne), ne)) in __init_nat_entry()
192 node_info_from_raw_nat(&ne->ni, raw_ne); in __init_nat_entry()
195 list_add_tail(&ne->list, &nm_i->nat_entries); in __init_nat_entry()
200 return ne; in __init_nat_entry()
205 struct nat_entry *ne; in __lookup_nat_cache() local
207 ne = radix_tree_lookup(&nm_i->nat_root, n); in __lookup_nat_cache()
210 if (ne && !get_nat_flag(ne, IS_DIRTY)) { in __lookup_nat_cache()
212 if (!list_empty(&ne->list)) in __lookup_nat_cache()
213 list_move_tail(&ne->list, &nm_i->nat_entries); in __lookup_nat_cache()
217 return ne; in __lookup_nat_cache()
235 struct nat_entry *ne) in __grab_nat_entry_set() argument
237 nid_t set = NAT_BLOCK_OFFSET(ne->ni.nid); in __grab_nat_entry_set()
255 struct nat_entry *ne) in __set_nat_cache_dirty() argument
258 bool new_ne = nat_get_blkaddr(ne) == NEW_ADDR; in __set_nat_cache_dirty()
261 head = __grab_nat_entry_set(nm_i, ne); in __set_nat_cache_dirty()
268 if (!new_ne && (get_nat_flag(ne, IS_PREALLOC) || in __set_nat_cache_dirty()
269 !get_nat_flag(ne, IS_DIRTY))) in __set_nat_cache_dirty()
272 set_nat_flag(ne, IS_PREALLOC, new_ne); in __set_nat_cache_dirty()
274 if (get_nat_flag(ne, IS_DIRTY)) in __set_nat_cache_dirty()
279 set_nat_flag(ne, IS_DIRTY, true); in __set_nat_cache_dirty()
283 list_del_init(&ne->list); in __set_nat_cache_dirty()
285 list_move_tail(&ne->list, &head->entry_list); in __set_nat_cache_dirty()
290 struct nat_entry_set *set, struct nat_entry *ne) in __clear_nat_cache_dirty() argument
293 list_move_tail(&ne->list, &nm_i->nat_entries); in __clear_nat_cache_dirty()
296 set_nat_flag(ne, IS_DIRTY, false); in __clear_nat_cache_dirty()
425 struct f2fs_nat_entry *ne) in cache_nat_entry() argument
441 e = __init_nat_entry(nm_i, new, ne, false); in cache_nat_entry()
443 f2fs_bug_on(sbi, nat_get_ino(e) != le32_to_cpu(ne->ino) || in cache_nat_entry()
445 le32_to_cpu(ne->block_addr) || in cache_nat_entry()
446 nat_get_version(e) != ne->version); in cache_nat_entry()
521 struct nat_entry *ne; in f2fs_try_to_free_nats() local
526 ne = list_first_entry(&nm_i->nat_entries, in f2fs_try_to_free_nats()
528 list_del(&ne->list); in f2fs_try_to_free_nats()
531 __del_from_nat_cache(nm_i, ne); in f2fs_try_to_free_nats()
551 struct f2fs_nat_entry ne; in f2fs_get_node_info() local
586 ne = nat_in_journal(journal, i); in f2fs_get_node_info()
587 node_info_from_raw_nat(ni, &ne); in f2fs_get_node_info()
604 ne = nat_blk->entries[nid - start_nid]; in f2fs_get_node_info()
605 node_info_from_raw_nat(ni, &ne); in f2fs_get_node_info()
608 blkaddr = le32_to_cpu(ne.block_addr); in f2fs_get_node_info()
614 cache_nat_entry(sbi, nid, &ne); in f2fs_get_node_info()
2274 struct nat_entry *ne; in add_free_nid() local
2315 ne = __lookup_nat_cache(nm_i, nid); in add_free_nid()
2316 if (ne && (!get_nat_flag(ne, IS_CHECKPOINTED) || in add_free_nid()
2317 nat_get_blkaddr(ne) != NULL_ADDR)) in add_free_nid()
2864 struct nat_entry *ne; in remove_nats_in_journal() local
2873 ne = __lookup_nat_cache(nm_i, nid); in remove_nats_in_journal()
2874 if (!ne) { in remove_nats_in_journal()
2875 ne = __alloc_nat_entry(sbi, nid, true); in remove_nats_in_journal()
2876 __init_nat_entry(nm_i, ne, &raw_ne, true); in remove_nats_in_journal()
2884 if (!get_nat_flag(ne, IS_DIRTY) && in remove_nats_in_journal()
2891 __set_nat_cache_dirty(nm_i, ne); in remove_nats_in_journal()
2991 struct nat_entry *ne, *cur; in __flush_nat_entry_set() local
3015 list_for_each_entry_safe(ne, cur, &set->entry_list, list) { in __flush_nat_entry_set()
3017 nid_t nid = nat_get_nid(ne); in __flush_nat_entry_set()
3020 f2fs_bug_on(sbi, nat_get_blkaddr(ne) == NEW_ADDR); in __flush_nat_entry_set()
3031 raw_nat_from_node_info(raw_ne, &ne->ni); in __flush_nat_entry_set()
3032 nat_reset_flag(ne); in __flush_nat_entry_set()
3033 __clear_nat_cache_dirty(NM_I(sbi), set, ne); in __flush_nat_entry_set()
3034 if (nat_get_blkaddr(ne) == NULL_ADDR) { in __flush_nat_entry_set()