Lines Matching refs:preftrees
123 struct preftrees { struct
371 struct preftrees *preftrees, int level, u64 parent, in add_direct_ref() argument
375 return add_prelim_ref(fs_info, &preftrees->direct, 0, NULL, level, in add_direct_ref()
381 struct preftrees *preftrees, u64 root_id, in add_indirect_ref() argument
386 struct preftree *tree = &preftrees->indirect; in add_indirect_ref()
389 tree = &preftrees->indirect_missing_keys; in add_indirect_ref()
394 static int is_shared_data_backref(struct preftrees *preftrees, u64 bytenr) in is_shared_data_backref() argument
396 struct rb_node **p = &preftrees->direct.root.rb_root.rb_node; in is_shared_data_backref()
421 struct preftrees *preftrees, struct prelim_ref *ref, in add_all_parents() argument
458 is_shared_data_backref(preftrees, eb->start) || in add_all_parents()
482 (is_shared_data_backref(preftrees, eb->start) || in add_all_parents()
544 struct preftrees *preftrees, in resolve_indirect_ref() argument
639 ret = add_all_parents(root, path, parents, preftrees, ref, level, in resolve_indirect_ref()
687 struct preftrees *preftrees, in resolve_indirect_refs() argument
708 while ((rnode = rb_first_cached(&preftrees->indirect.root))) { in resolve_indirect_refs()
718 rb_erase_cached(&ref->rbnode, &preftrees->indirect.root); in resolve_indirect_refs()
719 preftrees->indirect.count--; in resolve_indirect_refs()
732 err = resolve_indirect_ref(fs_info, path, time_seq, preftrees, in resolve_indirect_refs()
740 prelim_ref_insert(fs_info, &preftrees->direct, ref, in resolve_indirect_refs()
769 prelim_ref_insert(fs_info, &preftrees->direct, in resolve_indirect_refs()
777 prelim_ref_insert(fs_info, &preftrees->direct, ref, NULL); in resolve_indirect_refs()
795 struct preftrees *preftrees, bool lock) in add_missing_keys() argument
799 struct preftree *tree = &preftrees->indirect_missing_keys; in add_missing_keys()
831 prelim_ref_insert(fs_info, &preftrees->indirect, ref, NULL); in add_missing_keys()
843 struct preftrees *preftrees, struct share_check *sc) in add_delayed_refs() argument
884 ret = add_indirect_ref(fs_info, preftrees, ref->root, in add_delayed_refs()
896 ret = add_direct_ref(fs_info, preftrees, ref->level + 1, in add_delayed_refs()
928 ret = add_indirect_ref(fs_info, preftrees, ref->root, in add_delayed_refs()
939 ret = add_direct_ref(fs_info, preftrees, 0, ref->parent, in add_delayed_refs()
968 int *info_level, struct preftrees *preftrees, in add_inline_refs() argument
1027 ret = add_direct_ref(fs_info, preftrees, in add_inline_refs()
1038 ret = add_direct_ref(fs_info, preftrees, 0, offset, in add_inline_refs()
1043 ret = add_indirect_ref(fs_info, preftrees, offset, in add_inline_refs()
1067 ret = add_indirect_ref(fs_info, preftrees, root, in add_inline_refs()
1091 int info_level, struct preftrees *preftrees, in add_keyed_refs() argument
1123 ret = add_direct_ref(fs_info, preftrees, in add_keyed_refs()
1135 ret = add_direct_ref(fs_info, preftrees, 0, in add_keyed_refs()
1142 ret = add_indirect_ref(fs_info, preftrees, key.offset, in add_keyed_refs()
1167 ret = add_indirect_ref(fs_info, preftrees, root, in add_keyed_refs()
1221 struct preftrees preftrees = { in find_parent_nodes() local
1287 &preftrees, sc); in find_parent_nodes()
1308 &info_level, &preftrees, sc); in find_parent_nodes()
1312 &preftrees, sc); in find_parent_nodes()
1320 ret = add_missing_keys(fs_info, &preftrees, path->skip_locking == 0); in find_parent_nodes()
1324 WARN_ON(!RB_EMPTY_ROOT(&preftrees.indirect_missing_keys.root.rb_root)); in find_parent_nodes()
1326 ret = resolve_indirect_refs(fs_info, path, time_seq, &preftrees, in find_parent_nodes()
1331 WARN_ON(!RB_EMPTY_ROOT(&preftrees.indirect.root.rb_root)); in find_parent_nodes()
1340 node = rb_first_cached(&preftrees.direct.root); in find_parent_nodes()
1439 prelim_release(&preftrees.direct); in find_parent_nodes()
1440 prelim_release(&preftrees.indirect); in find_parent_nodes()
1441 prelim_release(&preftrees.indirect_missing_keys); in find_parent_nodes()