Home
last modified time | relevance | path

Searched refs:tree_root (Results 1 – 25 of 26) sorted by relevance

12

/fs/btrfs/
Droot-tree.c223 int btrfs_find_orphan_roots(struct btrfs_root *tree_root) in btrfs_find_orphan_roots() argument
234 if (tree_root->fs_info->sb->s_flags & MS_RDONLY) in btrfs_find_orphan_roots()
249 ret = btrfs_search_slot(NULL, tree_root, &key, path, 0, 0); in btrfs_find_orphan_roots()
257 ret = btrfs_next_leaf(tree_root, path); in btrfs_find_orphan_roots()
282 root = btrfs_lookup_fs_root(tree_root->fs_info, in btrfs_find_orphan_roots()
292 root = btrfs_read_fs_root(tree_root, &root_key); in btrfs_find_orphan_roots()
301 trans = btrfs_join_transaction(tree_root); in btrfs_find_orphan_roots()
304 btrfs_std_error(tree_root->fs_info, err, in btrfs_find_orphan_roots()
309 err = btrfs_del_orphan_item(trans, tree_root, in btrfs_find_orphan_roots()
311 btrfs_end_transaction(trans, tree_root); in btrfs_find_orphan_roots()
[all …]
Ddisk-io.c1252 struct btrfs_root *tree_root = fs_info->tree_root; in btrfs_create_tree() local
1262 __setup_root(tree_root->nodesize, tree_root->sectorsize, in btrfs_create_tree()
1263 tree_root->stripesize, root, fs_info, objectid); in btrfs_create_tree()
1308 ret = btrfs_insert_root(trans, tree_root, &key, &root->root_item); in btrfs_create_tree()
1331 struct btrfs_root *tree_root = fs_info->tree_root; in alloc_log_tree() local
1338 __setup_root(tree_root->nodesize, tree_root->sectorsize, in alloc_log_tree()
1339 tree_root->stripesize, root, fs_info, in alloc_log_tree()
1419 static struct btrfs_root *btrfs_read_tree_root(struct btrfs_root *tree_root, in btrfs_read_tree_root() argument
1423 struct btrfs_fs_info *fs_info = tree_root->fs_info; in btrfs_read_tree_root()
1438 __setup_root(tree_root->nodesize, tree_root->sectorsize, in btrfs_read_tree_root()
[all …]
Dtransaction.c1074 struct btrfs_root *tree_root = root->fs_info->tree_root; in update_cowonly_root() local
1085 ret = btrfs_update_root(trans, tree_root, in update_cowonly_root()
1114 eb = btrfs_lock_root_node(fs_info->tree_root); in commit_cowonly_roots()
1115 ret = btrfs_cow_block(trans, fs_info->tree_root, eb, NULL, in commit_cowonly_roots()
1239 err = btrfs_update_root(trans, fs_info->tree_root, in commit_fs_roots()
1275 btrfs_btree_balance_dirty(info->tree_root); in btrfs_defrag_root()
1306 struct btrfs_root *tree_root = fs_info->tree_root; in create_pending_snapshot() local
1336 pending->error = btrfs_find_free_objectid(tree_root, &objectid); in create_pending_snapshot()
1459 ret = btrfs_insert_root(trans, tree_root, &key, new_root_item); in create_pending_snapshot()
1470 ret = btrfs_add_root_ref(trans, tree_root, objectid, in create_pending_snapshot()
[all …]
Dsuper.c289 close_ctree(btrfs_sb(sb)->tree_root); in btrfs_put_super()
849 struct btrfs_root *root = fs_info->tree_root; in btrfs_get_subvol_name_from_objectid()
984 struct btrfs_root *root = fs_info->tree_root; in get_default_subvol_objectid()
1071 close_ctree(fs_info->tree_root); in btrfs_fill_super()
1079 struct btrfs_root *root = fs_info->tree_root; in btrfs_sync_fs()
1121 struct btrfs_root *root = info->tree_root; in btrfs_show_options()
1618 struct btrfs_root *root = fs_info->tree_root; in btrfs_remount()
2042 ret = btrfs_calc_avail_data_space(fs_info->tree_root, &total_free_data); in btrfs_statfs()
2156 struct btrfs_root *root = btrfs_sb(sb)->tree_root; in btrfs_freeze()
Dexport.c172 root = root->fs_info->tree_root; in btrfs_get_parent()
253 root = root->fs_info->tree_root; in btrfs_get_name()
Dtree-log.h63 int btrfs_recover_log_trees(struct btrfs_root *tree_root);
Dqgroup.c859 struct btrfs_root *tree_root = fs_info->tree_root; in btrfs_quota_enable() local
923 ret = btrfs_search_slot_for_read(tree_root, &key, path, 1, 0); in btrfs_quota_enable()
947 ret = btrfs_next_item(tree_root, path); in btrfs_quota_enable()
989 struct btrfs_root *tree_root = fs_info->tree_root; in btrfs_quota_disable() local
1011 ret = btrfs_del_root(trans, tree_root, &quota_root->root_key); in btrfs_quota_disable()
1018 clean_tree_block(trans, tree_root->fs_info, quota_root->node); in btrfs_quota_disable()
Dbtrfs_inode.h247 if (root == root->fs_info->tree_root && in btrfs_is_free_space_inode()
Ddisk-io.h68 struct btrfs_root *btrfs_read_fs_root(struct btrfs_root *tree_root,
Dextent-tree.c520 fs_info->tree_root->nodesize; in caching_thread()
2875 async->root = root->fs_info->tree_root; in btrfs_async_run_delayed_refs()
2923 root = root->fs_info->tree_root; in btrfs_run_delayed_refs()
3328 struct btrfs_root *root = block_group->fs_info->tree_root; in cache_save_setup()
5379 fs_info->tree_root->block_rsv = &fs_info->global_block_rsv; in init_global_block_rsv()
8843 struct btrfs_root *tree_root = root->fs_info->tree_root; in btrfs_drop_snapshot() local
8867 trans = btrfs_start_transaction(tree_root, 0); in btrfs_drop_snapshot()
8968 if (btrfs_should_end_transaction(trans, tree_root) || in btrfs_drop_snapshot()
8970 ret = btrfs_update_root(trans, tree_root, in btrfs_drop_snapshot()
8974 btrfs_abort_transaction(trans, tree_root, ret); in btrfs_drop_snapshot()
[all …]
Dreada.c696 dev->reada_next = re->logical + fs_info->tree_root->nodesize; in reada_start_machine_dev()
859 re->logical, fs_info->tree_root->nodesize, in dump_devs()
894 re->logical, fs_info->tree_root->nodesize, in dump_devs()
Dioctl.c415 ret = btrfs_trim_fs(fs_info->tree_root, &range); in btrfs_ioctl_fitrim()
460 ret = btrfs_find_free_objectid(root->fs_info->tree_root, &objectid); in create_subvol()
553 ret = btrfs_insert_root(trans, root->fs_info->tree_root, &key, in create_subvol()
603 ret = btrfs_add_root_ref(trans, root->fs_info->tree_root, in create_subvol()
1863 ret = btrfs_update_root(trans, root->fs_info->tree_root, in btrfs_ioctl_subvol_setflags()
1895 di = btrfs_lookup_dir_item(NULL, root->fs_info->tree_root, path, in may_destroy_subvol()
1912 ret = btrfs_search_slot(NULL, root->fs_info->tree_root, in may_destroy_subvol()
2526 root->fs_info->tree_root, in btrfs_ioctl_snap_destroy()
4179 di = btrfs_lookup_dir_item(trans, root->fs_info->tree_root, path, in btrfs_ioctl_default_subvol()
4939 trans = btrfs_start_transaction(root->fs_info->tree_root, 2); in btrfs_ioctl_quota_ctl()
[all …]
Dctree.h416 __le64 tree_root; member
1427 struct btrfs_root *tree_root; member
2968 tree_root, 64);
3758 kfree(fs_info->tree_root); in free_fs_info()
3778 int btrfs_find_root_ref(struct btrfs_root *tree_root,
3782 struct btrfs_root *tree_root,
3786 struct btrfs_root *tree_root,
3801 int btrfs_find_orphan_roots(struct btrfs_root *tree_root);
Ddev-replace.c466 struct btrfs_root *root = fs_info->tree_root; in btrfs_dev_replace_finishing()
708 struct btrfs_root *root = fs_info->tree_root; in __btrfs_dev_replace_cancel()
Drelocation.c1433 ret = btrfs_insert_root(trans, root->fs_info->tree_root,
1438 reloc_root = btrfs_read_fs_root(root->fs_info->tree_root, &root_key);
1511 ret = btrfs_update_root(trans, root->fs_info->tree_root,
3474 struct btrfs_root *root = fs_info->tree_root;
4261 inode = lookup_free_space_inode(fs_info->tree_root, rc->block_group,
4337 trans = btrfs_start_transaction(root->fs_info->tree_root, 0);
4345 ret = btrfs_update_root(trans, root->fs_info->tree_root,
4348 err = btrfs_end_transaction(trans, root->fs_info->tree_root);
4383 ret = btrfs_search_slot(NULL, root->fs_info->tree_root, &key,
Ddir-item.c169 if (root == root->fs_info->tree_root) { in btrfs_insert_dir_item()
Dinode.c1823 root != root->fs_info->tree_root) in btrfs_clear_bit_hook()
2969 BUG_ON(root == root->fs_info->tree_root); in btrfs_finish_ordered_io()
3005 if (root != root->fs_info->tree_root) in btrfs_finish_ordered_io()
3244 ret = btrfs_del_orphan_item(trans, root->fs_info->tree_root, in btrfs_orphan_commit_root()
3338 ret = btrfs_insert_orphan_item(trans, root->fs_info->tree_root, in btrfs_orphan_add()
3464 if (ret == -ESTALE && root == root->fs_info->tree_root) { in btrfs_orphan_cleanup()
3821 if (root == root->fs_info->tree_root) in btrfs_read_locked_inode()
4179 ret = btrfs_del_root_ref(trans, root->fs_info->tree_root, in btrfs_unlink_subvol()
4379 root == root->fs_info->tree_root) in btrfs_truncate_inode_items()
4580 root == root->fs_info->tree_root)) { in btrfs_truncate_inode_items()
[all …]
Dvolumes.c3634 ret = del_balance_item(fs_info->tree_root); in __cancel_balance()
3769 ret = insert_balance_item(fs_info->tree_root, bctl); in btrfs_balance()
3849 if (btrfs_test_opt(fs_info->tree_root, SKIP_BALANCE)) { in btrfs_resume_balance_async()
3885 ret = btrfs_search_slot(NULL, fs_info->tree_root, &key, path, 0, 0); in btrfs_recover_balance()
3998 struct btrfs_root *root = fs_info->tree_root; in btrfs_uuid_scan_kthread()
4197 struct btrfs_root *tree_root = fs_info->tree_root; in btrfs_create_uuid_tree() local
4206 trans = btrfs_start_transaction(tree_root, 2); in btrfs_create_uuid_tree()
4214 btrfs_abort_transaction(trans, tree_root, ret); in btrfs_create_uuid_tree()
4220 ret = btrfs_commit_transaction(trans, tree_root); in btrfs_create_uuid_tree()
Dfree-space-cache.c840 struct btrfs_root *root = fs_info->tree_root; in load_free_space_cache()
879 ret = __load_free_space_cache(fs_info->tree_root, inode, ctl, in load_free_space_cache()
1166 root = root->fs_info->tree_root; in btrfs_wait_cache_io()
1380 root = root->fs_info->tree_root; in btrfs_write_out_cache()
Dtree-log.c2948 ret = write_ctree_super(trans, root->fs_info->tree_root, 1); in btrfs_sync_log()
5511 trans = btrfs_start_transaction(fs_info->tree_root, 0); in btrfs_recover_log_trees()
5630 ret = btrfs_commit_transaction(trans, fs_info->tree_root); in btrfs_recover_log_trees()
5642 btrfs_end_transaction(wc.trans, fs_info->tree_root); in btrfs_recover_log_trees()
Dfile.c375 if (!__need_auto_defrag(fs_info->tree_root)) in btrfs_run_defrag_inodes()
726 root == root->fs_info->tree_root); in __btrfs_drop_extents()
Dextent_io.c3876 leaf_data_end(fs_info->tree_root, eb); in write_one_eb()
4842 len = fs_info->tree_root->nodesize; in alloc_dummy_extent_buffer()
5008 unsigned long len = fs_info->tree_root->nodesize; in alloc_extent_buffer()
Dbackref.c535 eb = read_tree_block(fs_info->tree_root, ref->wanted_disk_byte, in __add_missing_keys()
Dctree.c1386 BTRFS_NODEPTRS_PER_BLOCK(fs_info->tree_root)); in tree_mod_log_rewind()
/fs/btrfs/tests/
Dqgroup-tests.c471 root->fs_info->tree_root = root; in btrfs_test_qgroups()

12