Lines Matching refs:fs_info

338 static int __resolve_indirect_ref(struct btrfs_fs_info *fs_info,  in __resolve_indirect_ref()  argument
356 index = srcu_read_lock(&fs_info->subvol_srcu); in __resolve_indirect_ref()
358 root = btrfs_get_fs_root(fs_info, &root_key, false); in __resolve_indirect_ref()
360 srcu_read_unlock(&fs_info->subvol_srcu, index); in __resolve_indirect_ref()
366 srcu_read_unlock(&fs_info->subvol_srcu, index); in __resolve_indirect_ref()
379 srcu_read_unlock(&fs_info->subvol_srcu, index); in __resolve_indirect_ref()
392 srcu_read_unlock(&fs_info->subvol_srcu, index); in __resolve_indirect_ref()
423 static int __resolve_indirect_refs(struct btrfs_fs_info *fs_info, in __resolve_indirect_refs() argument
456 err = __resolve_indirect_ref(fs_info, path, time_seq, ref, in __resolve_indirect_refs()
520 static int __add_missing_keys(struct btrfs_fs_info *fs_info, in __add_missing_keys() argument
535 eb = read_tree_block(fs_info->tree_root, ref->wanted_disk_byte, in __add_missing_keys()
714 static int __add_inline_refs(struct btrfs_fs_info *fs_info, in __add_inline_refs() argument
827 static int __add_keyed_refs(struct btrfs_fs_info *fs_info, in __add_keyed_refs() argument
831 struct btrfs_root *extent_root = fs_info->extent_root; in __add_keyed_refs()
929 struct btrfs_fs_info *fs_info, u64 bytenr, argument
951 if (btrfs_fs_incompat(fs_info, SKINNY_METADATA))
975 ret = btrfs_search_slot(trans, fs_info->extent_root, &key, path, 0, 0);
1032 ret = __add_inline_refs(fs_info, path, bytenr,
1037 ret = __add_keyed_refs(fs_info, path, bytenr,
1047 ret = __add_missing_keys(fs_info, &prefs);
1053 ret = __resolve_indirect_refs(fs_info, path, time_seq, &prefs,
1080 eb = read_tree_block(fs_info->extent_root,
1166 struct btrfs_fs_info *fs_info, u64 bytenr, argument
1176 ret = find_parent_nodes(trans, fs_info, bytenr,
1200 struct btrfs_fs_info *fs_info, u64 bytenr, argument
1219 ret = find_parent_nodes(trans, fs_info, bytenr,
1238 struct btrfs_fs_info *fs_info, u64 bytenr, argument
1244 down_read(&fs_info->commit_root_sem);
1245 ret = __btrfs_find_all_roots(trans, fs_info, bytenr, time_seq, roots);
1247 up_read(&fs_info->commit_root_sem);
1265 struct btrfs_fs_info *fs_info, u64 root_objectid, argument
1284 btrfs_get_tree_mod_seq(fs_info, &elem);
1286 down_read(&fs_info->commit_root_sem);
1289 ret = find_parent_nodes(trans, fs_info, bytenr, elem.seq, tmp,
1306 btrfs_put_tree_mod_seq(fs_info, &elem);
1308 up_read(&fs_info->commit_root_sem);
1472 int extent_from_logical(struct btrfs_fs_info *fs_info, u64 logical, argument
1484 if (btrfs_fs_incompat(fs_info, SKINNY_METADATA))
1491 ret = btrfs_search_slot(NULL, fs_info->extent_root, &key, path, 0, 0);
1495 ret = btrfs_previous_extent_item(fs_info->extent_root, path, 0);
1503 size = fs_info->extent_root->nodesize;
1669 int iterate_extent_inodes(struct btrfs_fs_info *fs_info, argument
1688 trans = btrfs_join_transaction(fs_info->extent_root);
1691 btrfs_get_tree_mod_seq(fs_info, &tree_mod_seq_elem);
1693 down_read(&fs_info->commit_root_sem);
1696 ret = btrfs_find_all_leafs(trans, fs_info, extent_item_objectid,
1704 ret = __btrfs_find_all_roots(trans, fs_info, ref_node->val,
1725 btrfs_put_tree_mod_seq(fs_info, &tree_mod_seq_elem);
1726 btrfs_end_transaction(trans, fs_info->extent_root);
1728 up_read(&fs_info->commit_root_sem);
1734 int iterate_inodes_from_logical(u64 logical, struct btrfs_fs_info *fs_info, argument
1744 ret = extent_from_logical(fs_info, logical, path, &found_key, &flags);
1752 ret = iterate_extent_inodes(fs_info, found_key.objectid,