Home
last modified time | relevance | path

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

123456789

/fs/btrfs/
Dinode-map.c29 static void fail_caching_thread(struct btrfs_root *root) in fail_caching_thread() argument
31 struct btrfs_fs_info *fs_info = root->fs_info; in fail_caching_thread()
36 spin_lock(&root->ino_cache_lock); in fail_caching_thread()
37 root->ino_cache_state = BTRFS_CACHE_ERROR; in fail_caching_thread()
38 spin_unlock(&root->ino_cache_lock); in fail_caching_thread()
39 wake_up(&root->ino_cache_wait); in fail_caching_thread()
44 struct btrfs_root *root = data; in caching_kthread() local
45 struct btrfs_fs_info *fs_info = root->fs_info; in caching_kthread()
46 struct btrfs_free_space_ctl *ctl = root->free_ino_ctl; in caching_kthread()
59 fail_caching_thread(root); in caching_kthread()
[all …]
Dtree-checker.c36 #define CORRUPT(reason, eb, root, slot) \ argument
37 btrfs_crit(root->fs_info, \
40 reason, btrfs_header_bytenr(eb), root->objectid, slot)
63 static void generic_err(const struct btrfs_root *root, in generic_err() argument
75 btrfs_crit(root->fs_info, in generic_err()
78 root->objectid, btrfs_header_bytenr(eb), slot, &vaf); in generic_err()
82 static int check_extent_data_item(struct btrfs_root *root, in check_extent_data_item() argument
87 u32 sectorsize = root->fs_info->sectorsize; in check_extent_data_item()
92 leaf, root, slot); in check_extent_data_item()
99 CORRUPT("invalid file extent type", leaf, root, slot); in check_extent_data_item()
[all …]
Dtree-defrag.c33 struct btrfs_root *root) in btrfs_defrag_leaves() argument
44 if (root->fs_info->extent_root == root) { in btrfs_defrag_leaves()
52 if (!test_bit(BTRFS_ROOT_REF_COWS, &root->state)) in btrfs_defrag_leaves()
59 level = btrfs_header_level(root->node); in btrfs_defrag_leaves()
64 if (root->defrag_progress.objectid == 0) { in btrfs_defrag_leaves()
68 root_node = btrfs_lock_root_node(root); in btrfs_defrag_leaves()
71 root->defrag_max.objectid = 0; in btrfs_defrag_leaves()
73 btrfs_node_key_to_cpu(root_node, &root->defrag_max, in btrfs_defrag_leaves()
79 memcpy(&key, &root->defrag_progress, sizeof(key)); in btrfs_defrag_leaves()
84 ret = btrfs_search_forward(root, &key, path, min_trans); in btrfs_defrag_leaves()
[all …]
Ddisk-io.c68 static void free_fs_root(struct btrfs_root *root);
70 static void btrfs_destroy_ordered_extents(struct btrfs_root *root);
73 static void btrfs_destroy_delalloc_inodes(struct btrfs_root *root);
547 struct btrfs_root *root = BTRFS_I(page->mapping->host)->root; in btree_readpage_end_io_hook() local
548 struct btrfs_fs_info *fs_info = root->fs_info; in btree_readpage_end_io_hook()
605 if (found_level == 0 && btrfs_check_leaf_full(root, eb)) { in btree_readpage_end_io_hook()
610 if (found_level > 0 && btrfs_check_node(root, eb)) in btree_readpage_end_io_hook()
818 struct btrfs_root *root; in btree_csum_one_bio() local
823 root = BTRFS_I(bvec->bv_page->mapping->host)->root; in btree_csum_one_bio()
824 ret = csum_dirty_buffer(root->fs_info, bvec->bv_page); in btree_csum_one_bio()
[all …]
Dtransaction.c132 struct btrfs_root *root, *tmp; in switch_commit_roots() local
135 list_for_each_entry_safe(root, tmp, &trans->switch_commits, in switch_commit_roots()
137 list_del_init(&root->dirty_list); in switch_commit_roots()
138 free_extent_buffer(root->commit_root); in switch_commit_roots()
139 root->commit_root = btrfs_root_node(root); in switch_commit_roots()
140 if (is_fstree(root->objectid)) in switch_commit_roots()
141 btrfs_unpin_free_ino(root); in switch_commit_roots()
142 clear_btree_io_tree(&root->dirty_log_pages); in switch_commit_roots()
148 root = list_first_entry(&trans->dropped_roots, in switch_commit_roots()
150 list_del_init(&root->root_list); in switch_commit_roots()
[all …]
Dtree-log.c101 struct btrfs_root *root, struct btrfs_inode *inode,
107 struct btrfs_root *root,
110 struct btrfs_root *root,
144 struct btrfs_root *root, in start_log_trans() argument
147 struct btrfs_fs_info *fs_info = root->fs_info; in start_log_trans()
150 mutex_lock(&root->log_mutex); in start_log_trans()
152 if (root->log_root) { in start_log_trans()
158 if (!root->log_start_pid) { in start_log_trans()
159 clear_bit(BTRFS_ROOT_MULTI_LOG_TASKS, &root->state); in start_log_trans()
160 root->log_start_pid = current->pid; in start_log_trans()
[all …]
Droot-tree.c77 int btrfs_find_root(struct btrfs_root *root, const struct btrfs_key *search_key, in btrfs_find_root() argument
86 ret = btrfs_search_slot(NULL, root, search_key, path, 0, 0); in btrfs_find_root()
132 *root, struct btrfs_key *key, struct btrfs_root_item in btrfs_update_root()
135 struct btrfs_fs_info *fs_info = root->fs_info; in btrfs_update_root()
147 ret = btrfs_search_slot(trans, root, key, path, 0, 1); in btrfs_update_root()
155 root->root_key.objectid); in btrfs_update_root()
173 ret = btrfs_search_slot(trans, root, key, path, in btrfs_update_root()
180 ret = btrfs_del_item(trans, root, path); in btrfs_update_root()
186 ret = btrfs_insert_empty_item(trans, root, path, in btrfs_update_root()
210 int btrfs_insert_root(struct btrfs_trans_handle *trans, struct btrfs_root *root, in btrfs_insert_root() argument
[all …]
Dinode.c67 struct btrfs_root *root; member
183 struct btrfs_root *root, struct inode *inode, in insert_inline_extent() argument
212 ret = btrfs_insert_empty_item(trans, root, path, &key, in insert_inline_extent()
268 ret = btrfs_update_inode(trans, root, inode); in insert_inline_extent()
280 static noinline int cow_file_range_inline(struct btrfs_root *root, in cow_file_range_inline() argument
286 struct btrfs_fs_info *fs_info = root->fs_info; in cow_file_range_inline()
315 trans = btrfs_join_transaction(root); in cow_file_range_inline()
329 ret = __btrfs_drop_extents(trans, root, inode, path, in cow_file_range_inline()
340 root, inode, start, in cow_file_range_inline()
379 struct btrfs_root *root; member
[all …]
Drelocation.c62 struct btrfs_root *root; member
291 static struct rb_node *tree_insert(struct rb_root *root, u64 bytenr, in tree_insert() argument
294 struct rb_node **p = &root->rb_node; in tree_insert()
311 rb_insert_color(node, root); in tree_insert()
315 static struct rb_node *tree_search(struct rb_root *root, u64 bytenr) in tree_search() argument
317 struct rb_node *n = root->rb_node; in tree_search()
339 if (bnode->root) in backref_tree_panic()
340 fs_info = bnode->root->fs_info; in backref_tree_panic()
530 static int should_ignore_root(struct btrfs_root *root) in should_ignore_root() argument
534 if (!test_bit(BTRFS_ROOT_REF_COWS, &root->state)) in should_ignore_root()
[all …]
Ddelayed-inode.c51 struct btrfs_root *root, u64 inode_id) in btrfs_init_delayed_node() argument
53 delayed_node->root = root; in btrfs_init_delayed_node()
78 struct btrfs_root *root = btrfs_inode->root; in btrfs_get_delayed_node() local
88 spin_lock(&root->inode_lock); in btrfs_get_delayed_node()
89 node = radix_tree_lookup(&root->delayed_nodes_tree, ino); in btrfs_get_delayed_node()
95 spin_unlock(&root->inode_lock); in btrfs_get_delayed_node()
122 spin_unlock(&root->inode_lock); in btrfs_get_delayed_node()
125 spin_unlock(&root->inode_lock); in btrfs_get_delayed_node()
135 struct btrfs_root *root = btrfs_inode->root; in btrfs_get_or_create_delayed_node() local
147 btrfs_init_delayed_node(node, root, ino); in btrfs_get_or_create_delayed_node()
[all …]
Dtransaction.h128 struct btrfs_root *root; member
136 struct btrfs_root *root; member
155 BTRFS_I(inode)->last_sub_trans = BTRFS_I(inode)->root->log_transid; in btrfs_set_inode_last_trans()
156 BTRFS_I(inode)->last_log_commit = BTRFS_I(inode)->root->last_log_commit; in btrfs_set_inode_last_trans()
184 struct btrfs_trans_handle *btrfs_start_transaction(struct btrfs_root *root,
187 struct btrfs_root *root,
191 struct btrfs_root *root,
193 struct btrfs_trans_handle *btrfs_join_transaction(struct btrfs_root *root);
194 struct btrfs_trans_handle *btrfs_join_transaction_nolock(struct btrfs_root *root);
195 struct btrfs_trans_handle *btrfs_attach_transaction(struct btrfs_root *root);
[all …]
Dctree.c30 *root, struct btrfs_path *path, int level);
31 static int split_leaf(struct btrfs_trans_handle *trans, struct btrfs_root *root,
42 static void del_ptr(struct btrfs_root *root, struct btrfs_path *path,
148 struct extent_buffer *btrfs_root_node(struct btrfs_root *root) in btrfs_root_node() argument
154 eb = rcu_dereference(root->node); in btrfs_root_node()
176 struct extent_buffer *btrfs_lock_root_node(struct btrfs_root *root) in btrfs_lock_root_node() argument
181 eb = btrfs_root_node(root); in btrfs_lock_root_node()
183 if (eb == root->node) in btrfs_lock_root_node()
195 static struct extent_buffer *btrfs_read_lock_root_node(struct btrfs_root *root) in btrfs_read_lock_root_node() argument
200 eb = btrfs_root_node(root); in btrfs_read_lock_root_node()
[all …]
Dbtrfs_inode.h51 struct btrfs_root *root; member
227 const struct btrfs_root *root) in btrfs_inode_hash() argument
229 u64 h = objectid ^ (root->objectid * GOLDEN_RATIO_PRIME); in btrfs_inode_hash()
240 unsigned long h = btrfs_inode_hash(inode->i_ino, BTRFS_I(inode)->root); in btrfs_insert_inode_hash()
266 struct btrfs_root *root = inode->root; in btrfs_is_free_space_inode() local
268 if (root == root->fs_info->tree_root && in btrfs_is_free_space_inode()
283 inode->last_sub_trans <= inode->root->last_log_commit) { in btrfs_inode_in_log()
348 struct btrfs_root *root = inode->root; in btrfs_print_data_csum_error() local
351 if (root->objectid >= BTRFS_LAST_FREE_OBJECTID) in btrfs_print_data_csum_error()
352 btrfs_warn_rl(root->fs_info, in btrfs_print_data_csum_error()
[all …]
Ddir-item.c34 struct btrfs_root *root, in insert_with_overflow() argument
41 struct btrfs_fs_info *fs_info = root->fs_info; in insert_with_overflow()
47 ret = btrfs_insert_empty_item(trans, root, path, cpu_key, data_size); in insert_with_overflow()
70 struct btrfs_root *root, in btrfs_insert_xattr_item() argument
83 if (name_len + data_len > BTRFS_MAX_XATTR_SIZE(root->fs_info)) in btrfs_insert_xattr_item()
91 dir_item = insert_with_overflow(trans, root, path, &key, data_size, in btrfs_insert_xattr_item()
123 *root, const char *name, int name_len, in btrfs_insert_dir_item()
149 dir_item = insert_with_overflow(trans, root, path, &key, data_size, in btrfs_insert_dir_item()
171 if (root == root->fs_info->tree_root) { in btrfs_insert_dir_item()
177 ret2 = btrfs_insert_delayed_dir_index(trans, root->fs_info, name, in btrfs_insert_dir_item()
[all …]
Dinode-item.c97 struct btrfs_root *root, in btrfs_lookup_inode_extref() argument
111 ret = btrfs_search_slot(trans, root, &key, path, ins_len, cow); in btrfs_lookup_inode_extref()
122 struct btrfs_root *root, in btrfs_del_inode_extref() argument
147 ret = btrfs_search_slot(trans, root, &key, path, -1, 1); in btrfs_del_inode_extref()
160 btrfs_handle_fs_error(root->fs_info, -ENOENT, NULL); in btrfs_del_inode_extref()
175 ret = btrfs_del_item(trans, root, path); in btrfs_del_inode_extref()
185 btrfs_truncate_item(root->fs_info, path, item_size - del_len, 1); in btrfs_del_inode_extref()
194 struct btrfs_root *root, in btrfs_del_inode_ref() argument
220 ret = btrfs_search_slot(trans, root, &key, path, -1, 1); in btrfs_del_inode_ref()
240 ret = btrfs_del_item(trans, root, path); in btrfs_del_inode_ref()
[all …]
Dordered-data.c42 static struct rb_node *tree_insert(struct rb_root *root, u64 file_offset, in tree_insert() argument
45 struct rb_node **p = &root->rb_node; in tree_insert()
62 rb_insert_color(node, root); in tree_insert()
78 static struct rb_node *__tree_search(struct rb_root *root, u64 file_offset, in __tree_search() argument
81 struct rb_node *n = root->rb_node; in __tree_search()
155 struct rb_root *root = &tree->tree; in tree_search() local
166 ret = __tree_search(root, file_offset, &prev); in tree_search()
190 struct btrfs_root *root = BTRFS_I(inode)->root; in __btrfs_add_ordered_extent() local
233 spin_lock(&root->ordered_extent_lock); in __btrfs_add_ordered_extent()
235 &root->ordered_extents); in __btrfs_add_ordered_extent()
[all …]
Dexport.c35 fid->root_objectid = BTRFS_I(inode)->root->objectid; in btrfs_encode_fh()
43 parent_root_id = BTRFS_I(parent)->root->objectid; in btrfs_encode_fh()
64 struct btrfs_root *root; in btrfs_get_dentry() local
79 root = btrfs_read_fs_root_no_name(fs_info, &key); in btrfs_get_dentry()
80 if (IS_ERR(root)) { in btrfs_get_dentry()
81 err = PTR_ERR(root); in btrfs_get_dentry()
89 inode = btrfs_iget(sb, &key, root, NULL); in btrfs_get_dentry()
158 struct btrfs_root *root = BTRFS_I(dir)->root; in btrfs_get_parent() local
171 key.objectid = root->root_key.objectid; in btrfs_get_parent()
174 root = fs_info->tree_root; in btrfs_get_parent()
[all …]
Dxattr.c39 struct btrfs_root *root = BTRFS_I(inode)->root; in __btrfs_getxattr() local
50 di = btrfs_lookup_xattr(NULL, root, path, btrfs_ino(BTRFS_I(inode)), in __btrfs_getxattr()
96 struct btrfs_root *root = BTRFS_I(inode)->root; in do_setxattr() local
97 struct btrfs_fs_info *fs_info = root->fs_info; in do_setxattr()
102 if (name_len + size > BTRFS_MAX_XATTR_SIZE(root->fs_info)) in do_setxattr()
111 di = btrfs_lookup_xattr(trans, root, path, in do_setxattr()
118 ret = btrfs_delete_one_dir_name(trans, root, path, di); in do_setxattr()
131 di = btrfs_lookup_xattr(NULL, root, path, in do_setxattr()
143 ret = btrfs_insert_xattr_item(trans, root, path, btrfs_ino(BTRFS_I(inode)), in do_setxattr()
206 ret = btrfs_delete_one_dir_name(trans, root, path, di); in do_setxattr()
[all …]
Dinode-map.h5 void btrfs_init_free_ino_ctl(struct btrfs_root *root);
6 void btrfs_unpin_free_ino(struct btrfs_root *root);
7 void btrfs_return_ino(struct btrfs_root *root, u64 objectid);
8 int btrfs_find_free_ino(struct btrfs_root *root, u64 *objectid);
9 int btrfs_save_ino_cache(struct btrfs_root *root,
12 int btrfs_find_free_objectid(struct btrfs_root *root, u64 *objectid);
13 int btrfs_find_highest_objectid(struct btrfs_root *root, u64 *objectid);
/fs/btrfs/tests/
Dqgroup-tests.c27 static int insert_normal_tree_ref(struct btrfs_root *root, u64 bytenr, in insert_normal_tree_ref() argument
53 ret = btrfs_insert_empty_item(&trans, root, path, &ins, size); in insert_normal_tree_ref()
80 static int add_tree_ref(struct btrfs_root *root, u64 bytenr, u64 num_bytes, in add_tree_ref() argument
103 ret = btrfs_search_slot(&trans, root, &key, path, 0, 1); in add_tree_ref()
125 ret = btrfs_insert_empty_item(&trans, root, path, &key, 0); in add_tree_ref()
132 static int remove_extent_item(struct btrfs_root *root, u64 bytenr, in remove_extent_item() argument
153 ret = btrfs_search_slot(&trans, root, &key, path, -1, 1); in remove_extent_item()
159 btrfs_del_item(&trans, root, path); in remove_extent_item()
164 static int remove_extent_ref(struct btrfs_root *root, u64 bytenr, in remove_extent_ref() argument
187 ret = btrfs_search_slot(&trans, root, &key, path, 0, 1); in remove_extent_ref()
[all …]
Dinode-tests.c28 static void insert_extent(struct btrfs_root *root, u64 start, u64 len, in insert_extent() argument
34 struct extent_buffer *leaf = root->node; in insert_extent()
49 setup_items_for_insert(root, &path, &key, &value_len, value_len, in insert_extent()
64 static void insert_inode_item_key(struct btrfs_root *root) in insert_inode_item_key() argument
67 struct extent_buffer *leaf = root->node; in insert_inode_item_key()
80 setup_items_for_insert(root, &path, &key, &value_len, value_len, in insert_inode_item_key()
102 static void setup_file_extents(struct btrfs_root *root, u32 sectorsize) in setup_file_extents() argument
109 insert_extent(root, offset, 5, 5, 0, 0, 0, BTRFS_FILE_EXTENT_REG, 0, in setup_file_extents()
120 insert_extent(root, offset, 1, 1, 0, 0, 0, BTRFS_FILE_EXTENT_INLINE, 0, in setup_file_extents()
126 insert_extent(root, offset, 4, 4, 0, 0, 0, BTRFS_FILE_EXTENT_REG, 0, in setup_file_extents()
[all …]
/fs/kernfs/
Dmount.c27 struct kernfs_root *root = kernfs_info(sb)->root; in kernfs_sop_remount_fs() local
28 struct kernfs_syscall_ops *scops = root->syscall_ops; in kernfs_sop_remount_fs()
31 return scops->remount_fs(root, flags, data); in kernfs_sop_remount_fs()
37 struct kernfs_root *root = kernfs_root(kernfs_dentry_node(dentry)); in kernfs_sop_show_options() local
38 struct kernfs_syscall_ops *scops = root->syscall_ops; in kernfs_sop_show_options()
41 return scops->show_options(sf, root); in kernfs_sop_show_options()
48 struct kernfs_root *root = kernfs_root(node); in kernfs_sop_show_path() local
49 struct kernfs_syscall_ops *scops = root->syscall_ops; in kernfs_sop_show_path()
52 return scops->show_path(sf, node, root); in kernfs_sop_show_path()
72 struct kernfs_node *kernfs_get_node_by_id(struct kernfs_root *root, in kernfs_get_node_by_id() argument
[all …]
Ddir.c434 struct kernfs_root *root = kernfs_root(kn); in kernfs_put_active() local
446 wake_up_all(&root->deactivate_waitq); in kernfs_put_active()
460 struct kernfs_root *root = kernfs_root(kn); in kernfs_drain() local
474 wait_event(root->deactivate_waitq, in kernfs_drain()
509 struct kernfs_root *root; in kernfs_put() local
517 root = kernfs_root(kn); in kernfs_put()
542 idr_remove(&root->ino_idr, kn->id.ino); in kernfs_put()
552 idr_destroy(&root->ino_idr); in kernfs_put()
553 kfree(root); in kernfs_put()
620 static struct kernfs_node *__kernfs_new_node(struct kernfs_root *root, in __kernfs_new_node() argument
[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/cachefiles/
Dbind.c90 struct dentry *graveyard, *cachedir, *root; in cachefiles_daemon_add_cache() local
123 root = path.dentry; in cachefiles_daemon_add_cache()
127 if (d_is_negative(root) || in cachefiles_daemon_add_cache()
128 !d_backing_inode(root)->i_op->lookup || in cachefiles_daemon_add_cache()
129 !d_backing_inode(root)->i_op->mkdir || in cachefiles_daemon_add_cache()
130 !(d_backing_inode(root)->i_opflags & IOP_XATTR) || in cachefiles_daemon_add_cache()
131 !root->d_sb->s_op->statfs || in cachefiles_daemon_add_cache()
132 !root->d_sb->s_op->sync_fs) in cachefiles_daemon_add_cache()
136 if (sb_rdonly(root->d_sb)) in cachefiles_daemon_add_cache()
141 ret = cachefiles_determine_cache_security(cache, root, &saved_cred); in cachefiles_daemon_add_cache()
[all …]

123456789