Home
last modified time | relevance | path

Searched refs:root (Results 1 – 25 of 272) sorted by relevance

1234567891011

/fs/btrfs/
Dtree-defrag.c20 struct btrfs_root *root) in btrfs_defrag_leaves() argument
30 if (root->fs_info->extent_root == root) { in btrfs_defrag_leaves()
38 if (!test_bit(BTRFS_ROOT_SHAREABLE, &root->state)) in btrfs_defrag_leaves()
47 level = btrfs_header_level(root->node); in btrfs_defrag_leaves()
52 if (root->defrag_progress.objectid == 0) { in btrfs_defrag_leaves()
56 root_node = btrfs_lock_root_node(root); in btrfs_defrag_leaves()
58 root->defrag_max.objectid = 0; in btrfs_defrag_leaves()
60 btrfs_node_key_to_cpu(root_node, &root->defrag_max, in btrfs_defrag_leaves()
66 memcpy(&key, &root->defrag_progress, sizeof(key)); in btrfs_defrag_leaves()
71 ret = btrfs_search_forward(root, &key, path, BTRFS_OLDEST_GENERATION); in btrfs_defrag_leaves()
[all …]
Ddisk-io.c55 static void btrfs_destroy_ordered_extents(struct btrfs_root *root);
58 static void btrfs_destroy_delalloc_inodes(struct btrfs_root *root);
787 struct btrfs_fs_info *fs_info = BTRFS_I(inode)->root->fs_info; in btrfs_wq_submit_bio()
816 struct btrfs_root *root; in btree_csum_one_bio() local
822 root = BTRFS_I(bvec->bv_page->mapping->host)->root; in btree_csum_one_bio()
823 ret = csum_dirty_buffer(root->fs_info, bvec); in btree_csum_one_bio()
927 fs_info = BTRFS_I(mapping->host)->root->fs_info; in btree_writepages()
954 btrfs_warn(BTRFS_I(page->mapping->host)->root->fs_info, in btree_invalidatepage()
1076 static void __setup_root(struct btrfs_root *root, struct btrfs_fs_info *fs_info, in __setup_root() argument
1080 root->fs_info = fs_info; in __setup_root()
[all …]
Drelocation.c291 static bool reloc_root_is_dead(struct btrfs_root *root) in reloc_root_is_dead() argument
299 if (test_bit(BTRFS_ROOT_DEAD_RELOC_TREE, &root->state)) in reloc_root_is_dead()
312 static bool have_reloc_root(struct btrfs_root *root) in have_reloc_root() argument
314 if (reloc_root_is_dead(root)) in have_reloc_root()
316 if (!root->reloc_root) in have_reloc_root()
321 int btrfs_should_ignore_reloc_root(struct btrfs_root *root) in btrfs_should_ignore_reloc_root() argument
325 if (!test_bit(BTRFS_ROOT_SHAREABLE, &root->state)) in btrfs_should_ignore_reloc_root()
329 if (reloc_root_is_dead(root)) in btrfs_should_ignore_reloc_root()
332 reloc_root = root->reloc_root; in btrfs_should_ignore_reloc_root()
337 root->fs_info->running_transaction->transid) in btrfs_should_ignore_reloc_root()
[all …]
Dtransaction.c162 struct btrfs_root *root, *tmp; in switch_commit_roots() local
170 list_for_each_entry_safe(root, tmp, &cur_trans->switch_commits, in switch_commit_roots()
172 list_del_init(&root->dirty_list); in switch_commit_roots()
173 free_extent_buffer(root->commit_root); in switch_commit_roots()
174 root->commit_root = btrfs_root_node(root); in switch_commit_roots()
175 extent_io_tree_release(&root->dirty_log_pages); in switch_commit_roots()
176 btrfs_qgroup_clean_swapped_blocks(root); in switch_commit_roots()
182 root = list_first_entry(&cur_trans->dropped_roots, in switch_commit_roots()
184 list_del_init(&root->root_list); in switch_commit_roots()
186 btrfs_free_log(trans, root); in switch_commit_roots()
[all …]
Ddelayed-inode.c42 struct btrfs_root *root, u64 inode_id) in btrfs_init_delayed_node() argument
44 delayed_node->root = root; in btrfs_init_delayed_node()
69 struct btrfs_root *root = btrfs_inode->root; in btrfs_get_delayed_node() local
79 spin_lock(&root->inode_lock); in btrfs_get_delayed_node()
80 node = radix_tree_lookup(&root->delayed_nodes_tree, ino); in btrfs_get_delayed_node()
86 spin_unlock(&root->inode_lock); in btrfs_get_delayed_node()
113 spin_unlock(&root->inode_lock); in btrfs_get_delayed_node()
116 spin_unlock(&root->inode_lock); in btrfs_get_delayed_node()
126 struct btrfs_root *root = btrfs_inode->root; in btrfs_get_or_create_delayed_node() local
138 btrfs_init_delayed_node(node, root, ino); in btrfs_get_or_create_delayed_node()
[all …]
Dtree-log.c97 struct btrfs_root *root, struct btrfs_inode *inode,
101 struct btrfs_root *root,
104 struct btrfs_root *root,
108 static void wait_log_commit(struct btrfs_root *root, int transid);
139 struct btrfs_root *root, in start_log_trans() argument
142 struct btrfs_fs_info *fs_info = root->fs_info; in start_log_trans()
166 mutex_lock(&root->log_mutex); in start_log_trans()
169 if (root->log_root) { in start_log_trans()
170 int index = (root->log_transid + 1) % 2; in start_log_trans()
177 if (zoned && atomic_read(&root->log_commit[index])) { in start_log_trans()
[all …]
Dctree.c20 *root, struct btrfs_path *path, int level);
21 static int split_leaf(struct btrfs_trans_handle *trans, struct btrfs_root *root,
30 static void del_ptr(struct btrfs_root *root, struct btrfs_path *path,
124 struct extent_buffer *btrfs_root_node(struct btrfs_root *root) in btrfs_root_node() argument
130 eb = rcu_dereference(root->node); in btrfs_root_node()
153 static void add_root_to_dirty_list(struct btrfs_root *root) in add_root_to_dirty_list() argument
155 struct btrfs_fs_info *fs_info = root->fs_info; in add_root_to_dirty_list()
157 if (test_bit(BTRFS_ROOT_DIRTY, &root->state) || in add_root_to_dirty_list()
158 !test_bit(BTRFS_ROOT_TRACK_DIRTY, &root->state)) in add_root_to_dirty_list()
162 if (!test_and_set_bit(BTRFS_ROOT_DIRTY, &root->state)) { in add_root_to_dirty_list()
[all …]
Droot-tree.c64 int btrfs_find_root(struct btrfs_root *root, const struct btrfs_key *search_key, in btrfs_find_root() argument
73 ret = btrfs_search_slot(NULL, root, search_key, path, 0, 0); in btrfs_find_root()
119 *root, struct btrfs_key *key, struct btrfs_root_item in btrfs_update_root()
122 struct btrfs_fs_info *fs_info = root->fs_info; in btrfs_update_root()
134 ret = btrfs_search_slot(trans, root, key, path, 0, 1); in btrfs_update_root()
142 root->root_key.objectid); in btrfs_update_root()
160 ret = btrfs_search_slot(trans, root, key, path, in btrfs_update_root()
167 ret = btrfs_del_item(trans, root, path); in btrfs_update_root()
173 ret = btrfs_insert_empty_item(trans, root, path, in btrfs_update_root()
197 int btrfs_insert_root(struct btrfs_trans_handle *trans, struct btrfs_root *root, in btrfs_insert_root() argument
[all …]
Dbtrfs_inode.h73 struct btrfs_root *root; member
246 return inode->root->fs_info->sectorsize; in btrfs_inode_sectorsize()
255 const struct btrfs_root *root) in btrfs_inode_hash() argument
257 u64 h = objectid ^ (root->root_key.objectid * GOLDEN_RATIO_PRIME); in btrfs_inode_hash()
268 unsigned long h = btrfs_inode_hash(inode->i_ino, BTRFS_I(inode)->root); in btrfs_insert_inode_hash()
294 struct btrfs_root *root = inode->root; in btrfs_is_free_space_inode() local
296 if (root == root->fs_info->tree_root && in btrfs_is_free_space_inode()
316 trace_btrfs_inode_mod_outstanding_extents(inode->root, btrfs_ino(inode), in btrfs_mod_outstanding_extents()
331 inode->last_sub_trans = inode->root->log_transid; in btrfs_set_inode_last_sub_trans()
342 inode->last_sub_trans <= inode->root->last_log_commit) in btrfs_inode_in_log()
[all …]
Dinode.c59 struct btrfs_root *root; member
194 btrfs_page_clamp_clear_ordered(inode->root->fs_info, page, in btrfs_cleanup_ordered_extents()
236 struct btrfs_root *root, struct inode *inode, in insert_inline_extent() argument
265 ret = btrfs_insert_empty_item(trans, root, path, &key, in insert_inline_extent()
315 size = ALIGN(size, root->fs_info->sectorsize); in insert_inline_extent()
346 struct btrfs_root *root = inode->root; in cow_file_range_inline() local
347 struct btrfs_fs_info *fs_info = root->fs_info; in cow_file_range_inline()
374 trans = btrfs_join_transaction(root); in cow_file_range_inline()
394 ret = btrfs_drop_extents(trans, root, inode, &drop_args); in cow_file_range_inline()
403 root, &inode->vfs_inode, start, in cow_file_range_inline()
[all …]
Ddir-item.c20 struct btrfs_root *root, in insert_with_overflow() argument
27 struct btrfs_fs_info *fs_info = root->fs_info; in insert_with_overflow()
33 ret = btrfs_insert_empty_item(trans, root, path, cpu_key, data_size); in insert_with_overflow()
56 struct btrfs_root *root, in btrfs_insert_xattr_item() argument
69 if (name_len + data_len > BTRFS_MAX_XATTR_SIZE(root->fs_info)) in btrfs_insert_xattr_item()
77 dir_item = insert_with_overflow(trans, root, path, &key, data_size, in btrfs_insert_xattr_item()
114 struct btrfs_root *root = dir->root; in btrfs_insert_dir_item() local
134 dir_item = insert_with_overflow(trans, root, path, &key, data_size, in btrfs_insert_dir_item()
156 if (root == root->fs_info->tree_root) { in btrfs_insert_dir_item()
175 struct btrfs_root *root, struct btrfs_path *path, in btrfs_lookup_match_dir() argument
[all …]
Dverity.c106 struct btrfs_root *root = inode->root; in drop_verity_items() local
118 trans = btrfs_start_transaction(root, 1); in drop_verity_items()
132 ret = btrfs_search_slot(trans, root, &key, path, -1, 1); in drop_verity_items()
156 ret = btrfs_del_items(trans, root, path, path->slots[0], 1); in drop_verity_items()
216 struct btrfs_root *root = inode->root; in write_key_bytes() local
230 trans = btrfs_start_transaction(root, 1); in write_key_bytes()
246 ret = btrfs_insert_empty_item(trans, root, path, &key, copy_bytes); in write_key_bytes()
295 struct btrfs_root *root = inode->root; in read_key_bytes() local
319 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0); in read_key_bytes()
392 ret = btrfs_next_leaf(root, path); in read_key_bytes()
[all …]
Dtransaction.h140 struct btrfs_root *root; member
156 struct btrfs_root *root; member
176 inode->last_sub_trans = inode->root->log_transid; in btrfs_set_inode_last_trans()
205 struct btrfs_trans_handle *btrfs_start_transaction(struct btrfs_root *root,
208 struct btrfs_root *root,
210 struct btrfs_trans_handle *btrfs_join_transaction(struct btrfs_root *root);
211 struct btrfs_trans_handle *btrfs_join_transaction_spacecache(struct btrfs_root *root);
212 struct btrfs_trans_handle *btrfs_join_transaction_nostart(struct btrfs_root *root);
213 struct btrfs_trans_handle *btrfs_attach_transaction(struct btrfs_root *root);
215 struct btrfs_root *root);
[all …]
Dordered-data.c33 static struct rb_node *tree_insert(struct rb_root *root, u64 file_offset, in tree_insert() argument
36 struct rb_node **p = &root->rb_node; in tree_insert()
53 rb_insert_color(node, root); in tree_insert()
61 static struct rb_node *__tree_search(struct rb_root *root, u64 file_offset, in __tree_search() argument
64 struct rb_node *n = root->rb_node; in __tree_search()
127 struct rb_root *root = &tree->tree; in tree_search() local
138 ret = __tree_search(root, file_offset, &prev); in tree_search()
157 struct btrfs_root *root = inode->root; in __btrfs_add_ordered_extent() local
158 struct btrfs_fs_info *fs_info = root->fs_info; in __btrfs_add_ordered_extent()
226 spin_lock(&root->ordered_extent_lock); in __btrfs_add_ordered_extent()
[all …]
Dxattr.c27 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_getxattr() local
38 di = btrfs_lookup_xattr(NULL, root, path, btrfs_ino(BTRFS_I(inode)), in btrfs_getxattr()
83 struct btrfs_root *root = BTRFS_I(inode)->root; in btrfs_setxattr() local
84 struct btrfs_fs_info *fs_info = root->fs_info; in btrfs_setxattr()
91 if (name_len + size > BTRFS_MAX_XATTR_SIZE(root->fs_info)) in btrfs_setxattr()
100 di = btrfs_lookup_xattr(trans, root, path, in btrfs_setxattr()
107 ret = btrfs_delete_one_dir_name(trans, root, path, di); in btrfs_setxattr()
120 di = btrfs_lookup_xattr(NULL, root, path, in btrfs_setxattr()
132 ret = btrfs_insert_xattr_item(trans, root, path, btrfs_ino(BTRFS_I(inode)), in btrfs_setxattr()
193 ret = btrfs_delete_one_dir_name(trans, root, path, di); in btrfs_setxattr()
[all …]
Dexport.c36 fid->root_objectid = BTRFS_I(inode)->root->root_key.objectid; in btrfs_encode_fh()
44 parent_root_id = BTRFS_I(parent)->root->root_key.objectid; in btrfs_encode_fh()
65 struct btrfs_root *root; in btrfs_get_dentry() local
71 root = btrfs_get_fs_root(fs_info, root_objectid, true); in btrfs_get_dentry()
72 if (IS_ERR(root)) in btrfs_get_dentry()
73 return ERR_CAST(root); in btrfs_get_dentry()
75 inode = btrfs_iget(sb, objectid, root); in btrfs_get_dentry()
76 btrfs_put_root(root); in btrfs_get_dentry()
138 struct btrfs_root *root = BTRFS_I(dir)->root; in btrfs_get_parent() local
151 key.objectid = root->root_key.objectid; in btrfs_get_parent()
[all …]
Dqgroup.h364 int btrfs_qgroup_reserve_meta(struct btrfs_root *root, int num_bytes,
366 int __btrfs_qgroup_reserve_meta(struct btrfs_root *root, int num_bytes,
369 static inline int btrfs_qgroup_reserve_meta_pertrans(struct btrfs_root *root, in btrfs_qgroup_reserve_meta_pertrans() argument
372 return __btrfs_qgroup_reserve_meta(root, num_bytes, in btrfs_qgroup_reserve_meta_pertrans()
375 static inline int btrfs_qgroup_reserve_meta_prealloc(struct btrfs_root *root, in btrfs_qgroup_reserve_meta_prealloc() argument
378 return __btrfs_qgroup_reserve_meta(root, num_bytes, in btrfs_qgroup_reserve_meta_prealloc()
382 void __btrfs_qgroup_free_meta(struct btrfs_root *root, int num_bytes,
386 static inline void btrfs_qgroup_free_meta_pertrans(struct btrfs_root *root, in btrfs_qgroup_free_meta_pertrans() argument
389 __btrfs_qgroup_free_meta(root, num_bytes, in btrfs_qgroup_free_meta_pertrans()
394 static inline void btrfs_qgroup_free_meta_prealloc(struct btrfs_root *root, in btrfs_qgroup_free_meta_prealloc() argument
[all …]
/fs/kernfs/
Ddir.c470 struct kernfs_root *root = kernfs_root(kn); in kernfs_drain() local
472 lockdep_assert_held_write(kernfs_rwsem(root)); in kernfs_drain()
475 up_write(kernfs_rwsem(root)); in kernfs_drain()
484 wait_event(root->deactivate_waitq, in kernfs_drain()
494 down_write(kernfs_rwsem(root)); in kernfs_drain()
519 struct kernfs_root *root; in kernfs_put() local
523 root = kernfs_root(kn); in kernfs_put()
545 idr_remove(&root->ino_idr, (u32)kernfs_ino(kn)); in kernfs_put()
555 idr_destroy(&root->ino_idr); in kernfs_put()
556 kfree(root); in kernfs_put()
[all …]
Dmount.c26 struct kernfs_root *root = kernfs_root(kernfs_dentry_node(dentry)); in kernfs_sop_show_options() local
27 struct kernfs_syscall_ops *scops = root->syscall_ops; in kernfs_sop_show_options()
30 return scops->show_options(sf, root); in kernfs_sop_show_options()
37 struct kernfs_root *root = kernfs_root(node); in kernfs_sop_show_path() local
38 struct kernfs_syscall_ops *scops = root->syscall_ops; in kernfs_sop_show_path()
41 return scops->show_path(sf, node, root); in kernfs_sop_show_path()
101 kn = kernfs_find_and_get_node_by_id(info->root, id); in __kernfs_fh_to_dentry()
161 return kernfs_info(sb)->root; in kernfs_root_from_sb()
239 struct kernfs_root *kf_root = kfc->root; in kernfs_fill_super()
241 struct dentry *root; in kernfs_fill_super() local
[all …]
/fs/vboxsf/
Dvboxsf_wrappers.c75 int vboxsf_map_folder(struct shfl_string *folder_name, u32 *root) in vboxsf_map_folder() argument
84 parms.root.type = VMMDEV_HGCM_PARM_TYPE_32BIT; in vboxsf_map_folder()
85 parms.root.u.value32 = 0; in vboxsf_map_folder()
98 *root = parms.root.u.value32; in vboxsf_map_folder()
102 int vboxsf_unmap_folder(u32 root) in vboxsf_unmap_folder() argument
106 parms.root.type = VMMDEV_HGCM_PARM_TYPE_32BIT; in vboxsf_unmap_folder()
107 parms.root.u.value32 = root; in vboxsf_unmap_folder()
130 int vboxsf_create(u32 root, struct shfl_string *parsed_path, in vboxsf_create() argument
135 parms.root.type = VMMDEV_HGCM_PARM_TYPE_32BIT; in vboxsf_create()
136 parms.root.u.value32 = root; in vboxsf_create()
[all …]
/fs/btrfs/tests/
Dqgroup-tests.c14 static int insert_normal_tree_ref(struct btrfs_root *root, u64 bytenr, in insert_normal_tree_ref() argument
39 ret = btrfs_insert_empty_item(&trans, root, path, &ins, size); in insert_normal_tree_ref()
66 static int add_tree_ref(struct btrfs_root *root, u64 bytenr, u64 num_bytes, in add_tree_ref() argument
88 ret = btrfs_search_slot(&trans, root, &key, path, 0, 1); in add_tree_ref()
110 ret = btrfs_insert_empty_item(&trans, root, path, &key, 0); in add_tree_ref()
117 static int remove_extent_item(struct btrfs_root *root, u64 bytenr, in remove_extent_item() argument
137 ret = btrfs_search_slot(&trans, root, &key, path, -1, 1); in remove_extent_item()
143 btrfs_del_item(&trans, root, path); in remove_extent_item()
148 static int remove_extent_ref(struct btrfs_root *root, u64 bytenr, in remove_extent_ref() argument
170 ret = btrfs_search_slot(&trans, root, &key, path, 0, 1); in remove_extent_ref()
[all …]
Dinode-tests.c15 static void insert_extent(struct btrfs_root *root, u64 start, u64 len, in insert_extent() argument
21 struct extent_buffer *leaf = root->node; in insert_extent()
36 setup_items_for_insert(root, &path, &key, &value_len, 1); in insert_extent()
50 static void insert_inode_item_key(struct btrfs_root *root) in insert_inode_item_key() argument
53 struct extent_buffer *leaf = root->node; in insert_inode_item_key()
66 setup_items_for_insert(root, &path, &key, &value_len, 1); in insert_inode_item_key()
87 static void setup_file_extents(struct btrfs_root *root, u32 sectorsize) in setup_file_extents() argument
94 insert_extent(root, offset, 5, 5, 0, 0, 0, BTRFS_FILE_EXTENT_REG, 0, in setup_file_extents()
105 insert_extent(root, offset, 1, 1, 0, 0, 0, BTRFS_FILE_EXTENT_INLINE, 0, in setup_file_extents()
111 insert_extent(root, offset, 4, 4, 0, 0, 0, BTRFS_FILE_EXTENT_REG, 0, in setup_file_extents()
[all …]
/fs/nfs/
Dgetroot.c72 struct dentry *root; in nfs_get_root() local
110 root = d_obtain_root(inode); in nfs_get_root()
111 if (IS_ERR(root)) { in nfs_get_root()
113 error = PTR_ERR(root); in nfs_get_root()
118 security_d_instantiate(root, inode); in nfs_get_root()
119 spin_lock(&root->d_lock); in nfs_get_root()
120 if (IS_ROOT(root) && !root->d_fsdata && in nfs_get_root()
121 !(root->d_flags & DCACHE_NFSFS_RENAMED)) { in nfs_get_root()
122 root->d_fsdata = name; in nfs_get_root()
125 spin_unlock(&root->d_lock); in nfs_get_root()
[all …]
/fs/nfs/blocklayout/
Dextent_tree.c19 ext_tree_first(struct rb_root *root) in ext_tree_first() argument
21 struct rb_node *node = rb_first(root); in ext_tree_first()
46 __ext_tree_search(struct rb_root *root, sector_t start) in __ext_tree_search() argument
48 struct rb_node *node = root->rb_node; in __ext_tree_search()
95 ext_try_to_merge_left(struct rb_root *root, struct pnfs_block_extent *be) in ext_try_to_merge_left() argument
101 rb_erase(&be->be_node, root); in ext_try_to_merge_left()
111 ext_try_to_merge_right(struct rb_root *root, struct pnfs_block_extent *be) in ext_try_to_merge_right() argument
117 rb_erase(&right->be_node, root); in ext_try_to_merge_right()
136 __ext_tree_insert(struct rb_root *root, in __ext_tree_insert() argument
139 struct rb_node **p = &root->rb_node, *parent = NULL; in __ext_tree_insert()
[all …]
/fs/
Dd_path.c105 const struct path *root, struct prepend_buffer *p) in __prepend_path() argument
107 while (dentry != root->dentry || &mnt->mnt != root->mnt) { in __prepend_path()
158 const struct path *root, in prepend_path() argument
173 error = __prepend_path(path->dentry, real_mount(path->mnt), root, &b); in prepend_path()
217 const struct path *root, in __d_path() argument
223 if (unlikely(prepend_path(path, root, &b) > 0)) in __d_path()
231 struct path root = {}; in d_absolute_path() local
235 if (unlikely(prepend_path(path, &root, &b) > 1)) in d_absolute_path()
240 static void get_fs_root_rcu(struct fs_struct *fs, struct path *root) in get_fs_root_rcu() argument
246 *root = fs->root; in get_fs_root_rcu()
[all …]

1234567891011