Home
last modified time | relevance | path

Searched refs:fs_info (Results 1 – 75 of 75) sorted by relevance

/linux-4.4.14/fs/btrfs/tests/
Dbtrfs-tests.c81 struct btrfs_fs_info *fs_info = kzalloc(sizeof(struct btrfs_fs_info), in btrfs_alloc_dummy_fs_info() local
84 if (!fs_info) in btrfs_alloc_dummy_fs_info()
85 return fs_info; in btrfs_alloc_dummy_fs_info()
86 fs_info->fs_devices = kzalloc(sizeof(struct btrfs_fs_devices), in btrfs_alloc_dummy_fs_info()
88 if (!fs_info->fs_devices) { in btrfs_alloc_dummy_fs_info()
89 kfree(fs_info); in btrfs_alloc_dummy_fs_info()
92 fs_info->super_copy = kzalloc(sizeof(struct btrfs_super_block), in btrfs_alloc_dummy_fs_info()
94 if (!fs_info->super_copy) { in btrfs_alloc_dummy_fs_info()
95 kfree(fs_info->fs_devices); in btrfs_alloc_dummy_fs_info()
96 kfree(fs_info); in btrfs_alloc_dummy_fs_info()
[all …]
Dqgroup-tests.c230 struct btrfs_fs_info *fs_info = root->fs_info; in test_no_shared_qgroup() local
238 ret = btrfs_create_qgroup(NULL, fs_info, 5); in test_no_shared_qgroup()
249 ret = btrfs_find_all_roots(&trans, fs_info, 4096, 0, &old_roots); in test_no_shared_qgroup()
260 ret = btrfs_find_all_roots(&trans, fs_info, 4096, 0, &new_roots); in test_no_shared_qgroup()
268 ret = btrfs_qgroup_account_extent(&trans, fs_info, 4096, 4096, in test_no_shared_qgroup()
275 if (btrfs_verify_qgroup_counts(fs_info, 5, 4096, 4096)) { in test_no_shared_qgroup()
282 ret = btrfs_find_all_roots(&trans, fs_info, 4096, 0, &old_roots); in test_no_shared_qgroup()
293 ret = btrfs_find_all_roots(&trans, fs_info, 4096, 0, &new_roots); in test_no_shared_qgroup()
301 ret = btrfs_qgroup_account_extent(&trans, fs_info, 4096, 4096, in test_no_shared_qgroup()
308 if (btrfs_verify_qgroup_counts(fs_info, 5, 0, 0)) { in test_no_shared_qgroup()
[all …]
Dfree-space-tests.c39 cache->fs_info = btrfs_alloc_dummy_fs_info(); in init_test_block_group()
40 if (!cache->fs_info) { in init_test_block_group()
906 root->fs_info = btrfs_alloc_dummy_fs_info(); in btrfs_test_free_space_cache()
907 if (!root->fs_info) in btrfs_test_free_space_cache()
910 root->fs_info->extent_root = root; in btrfs_test_free_space_cache()
911 cache->fs_info = root->fs_info; in btrfs_test_free_space_cache()
Dinode-tests.c252 root->fs_info = btrfs_alloc_dummy_fs_info(); in test_btrfs_get_extent()
253 if (!root->fs_info) { in test_btrfs_get_extent()
840 root->fs_info = btrfs_alloc_dummy_fs_info(); in test_hole_first()
841 if (!root->fs_info) { in test_hole_first()
932 root->fs_info = btrfs_alloc_dummy_fs_info(); in test_extent_accounting()
933 if (!root->fs_info) { in test_extent_accounting()
/linux-4.4.14/fs/btrfs/
Ddisk-io.c60 static int btrfs_check_super_valid(struct btrfs_fs_info *fs_info,
229 BTRFS_I(inode)->root->fs_info->fs_devices->latest_bdev; in btree_get_extent()
244 em->bdev = BTRFS_I(inode)->root->fs_info->fs_devices->latest_bdev; in btree_get_extent()
277 static int csum_tree_block(struct btrfs_fs_info *fs_info, in csum_tree_block() argument
281 u16 csum_size = btrfs_super_csum_size(fs_info->super_copy); in csum_tree_block()
322 btrfs_warn_rl(fs_info, in csum_tree_block()
325 fs_info->sb->s_id, buf->start, in csum_tree_block()
371 btrfs_err_rl(eb->fs_info, in verify_parent_transid()
449 io_tree = &BTRFS_I(root->fs_info->btree_inode)->io_tree; in btree_read_extent_buffer_pages()
470 num_copies = btrfs_num_copies(root->fs_info, in btree_read_extent_buffer_pages()
[all …]
Dqgroup.c138 qgroup_rescan_init(struct btrfs_fs_info *fs_info, u64 progress_objectid,
140 static void qgroup_rescan_zero_tracking(struct btrfs_fs_info *fs_info);
143 static struct btrfs_qgroup *find_qgroup_rb(struct btrfs_fs_info *fs_info, in find_qgroup_rb() argument
146 struct rb_node *n = fs_info->qgroup_tree.rb_node; in find_qgroup_rb()
162 static struct btrfs_qgroup *add_qgroup_rb(struct btrfs_fs_info *fs_info, in add_qgroup_rb() argument
165 struct rb_node **p = &fs_info->qgroup_tree.rb_node; in add_qgroup_rb()
191 rb_insert_color(&qgroup->node, &fs_info->qgroup_tree); in add_qgroup_rb()
220 static int del_qgroup_rb(struct btrfs_fs_info *fs_info, u64 qgroupid) in del_qgroup_rb() argument
222 struct btrfs_qgroup *qgroup = find_qgroup_rb(fs_info, qgroupid); in del_qgroup_rb()
227 rb_erase(&qgroup->node, &fs_info->qgroup_tree); in del_qgroup_rb()
[all …]
Ddev-replace.c41 static int btrfs_dev_replace_finishing(struct btrfs_fs_info *fs_info,
44 struct btrfs_fs_info *fs_info,
50 static u64 __btrfs_dev_replace_cancel(struct btrfs_fs_info *fs_info);
52 static int btrfs_dev_replace_continue_on_mount(struct btrfs_fs_info *fs_info);
55 int btrfs_init_dev_replace(struct btrfs_fs_info *fs_info) in btrfs_init_dev_replace() argument
58 struct btrfs_root *dev_root = fs_info->dev_root; in btrfs_init_dev_replace()
59 struct btrfs_dev_replace *dev_replace = &fs_info->dev_replace; in btrfs_init_dev_replace()
106 btrfs_warn(fs_info, in btrfs_init_dev_replace()
138 dev_replace->srcdev = btrfs_find_device(fs_info, src_devid, in btrfs_init_dev_replace()
140 dev_replace->tgtdev = btrfs_find_device(fs_info, in btrfs_init_dev_replace()
[all …]
Dtransaction.c112 struct btrfs_fs_info *fs_info) in switch_commit_roots() argument
116 down_write(&fs_info->commit_root_sem); in switch_commit_roots()
134 btrfs_drop_and_free_fs_root(fs_info, root); in switch_commit_roots()
138 up_write(&fs_info->commit_root_sem); in switch_commit_roots()
172 struct btrfs_fs_info *fs_info = root->fs_info; in join_transaction() local
174 spin_lock(&fs_info->trans_lock); in join_transaction()
177 if (test_bit(BTRFS_FS_STATE_ERROR, &fs_info->fs_state)) { in join_transaction()
178 spin_unlock(&fs_info->trans_lock); in join_transaction()
182 cur_trans = fs_info->running_transaction; in join_transaction()
185 spin_unlock(&fs_info->trans_lock); in join_transaction()
[all …]
Dsuper.c100 static void save_error_info(struct btrfs_fs_info *fs_info) in save_error_info() argument
106 set_bit(BTRFS_FS_STATE_ERROR, &fs_info->fs_state); in save_error_info()
110 static void btrfs_handle_error(struct btrfs_fs_info *fs_info) in btrfs_handle_error() argument
112 struct super_block *sb = fs_info->sb; in btrfs_handle_error()
117 if (test_bit(BTRFS_FS_STATE_ERROR, &fs_info->fs_state)) { in btrfs_handle_error()
119 btrfs_info(fs_info, "forced readonly"); in btrfs_handle_error()
138 void __btrfs_std_error(struct btrfs_fs_info *fs_info, const char *function, in __btrfs_std_error() argument
141 struct super_block *sb = fs_info->sb; in __btrfs_std_error()
174 save_error_info(fs_info); in __btrfs_std_error()
176 btrfs_handle_error(fs_info); in __btrfs_std_error()
[all …]
Dqgroup.h44 struct btrfs_fs_info *fs_info);
46 struct btrfs_fs_info *fs_info);
47 int btrfs_qgroup_rescan(struct btrfs_fs_info *fs_info);
48 void btrfs_qgroup_rescan_resume(struct btrfs_fs_info *fs_info);
49 int btrfs_qgroup_wait_for_completion(struct btrfs_fs_info *fs_info);
51 struct btrfs_fs_info *fs_info, u64 src, u64 dst);
53 struct btrfs_fs_info *fs_info, u64 src, u64 dst);
55 struct btrfs_fs_info *fs_info, u64 qgroupid);
57 struct btrfs_fs_info *fs_info, u64 qgroupid);
59 struct btrfs_fs_info *fs_info, u64 qgroupid,
[all …]
Dreada.c94 struct btrfs_fs_info *fs_info; member
100 static void reada_start_machine(struct btrfs_fs_info *fs_info);
101 static void __reada_start_machine(struct btrfs_fs_info *fs_info);
117 struct btrfs_fs_info *fs_info = root->fs_info; in __readahead_hook() local
126 spin_lock(&fs_info->reada_lock); in __readahead_hook()
127 re = radix_tree_lookup(&fs_info->reada_tree, index); in __readahead_hook()
130 spin_unlock(&fs_info->reada_lock); in __readahead_hook()
191 btrfs_debug(root->fs_info, in __readahead_hook()
223 reada_extent_put(fs_info, re); /* one ref for each entry */ in __readahead_hook()
225 reada_extent_put(fs_info, re); /* our ref */ in __readahead_hook()
[all …]
Dsysfs.c38 static u64 get_features(struct btrfs_fs_info *fs_info, in get_features() argument
41 struct btrfs_super_block *disk_super = fs_info->super_copy; in get_features()
50 static void set_features(struct btrfs_fs_info *fs_info, in set_features() argument
53 struct btrfs_super_block *disk_super = fs_info->super_copy; in set_features()
97 struct btrfs_fs_info *fs_info = to_fs_info(kobj); in btrfs_feature_attr_show() local
99 if (fs_info) { in btrfs_feature_attr_show()
100 u64 features = get_features(fs_info, fa->feature_set); in btrfs_feature_attr_show()
113 struct btrfs_fs_info *fs_info; in btrfs_feature_attr_store() local
119 fs_info = to_fs_info(kobj); in btrfs_feature_attr_store()
120 if (!fs_info) in btrfs_feature_attr_store()
[all …]
Dvolumes.c333 struct btrfs_fs_info *fs_info; in run_scheduled_bios() local
355 fs_info = device->dev_root->fs_info; in run_scheduled_bios()
356 limit = btrfs_async_submit_limit(fs_info); in run_scheduled_bios()
427 if (atomic_dec_return(&fs_info->nr_async_bios) < limit && in run_scheduled_bios()
428 waitqueue_active(&fs_info->async_submit_wait)) in run_scheduled_bios()
429 wake_up(&fs_info->async_submit_wait); in run_scheduled_bios()
461 fs_info->fs_devices->open_devices > 1) { in run_scheduled_bios()
494 btrfs_queue_work(fs_info->submit_workers, in run_scheduled_bios()
1173 struct btrfs_fs_info *fs_info = device->dev_root->fs_info; in contains_pending_extent() local
1175 struct list_head *search_list = &fs_info->pinned_chunks; in contains_pending_extent()
[all …]
Dscrub.c250 static void scrub_recheck_block(struct btrfs_fs_info *fs_info,
280 static void scrub_remap_extent(struct btrfs_fs_info *fs_info,
287 struct btrfs_fs_info *fs_info,
303 static void __scrub_blocked_if_needed(struct btrfs_fs_info *fs_info);
304 static void scrub_blocked_if_needed(struct btrfs_fs_info *fs_info);
321 static void __scrub_blocked_if_needed(struct btrfs_fs_info *fs_info) in __scrub_blocked_if_needed() argument
323 while (atomic_read(&fs_info->scrub_pause_req)) { in __scrub_blocked_if_needed()
324 mutex_unlock(&fs_info->scrub_lock); in __scrub_blocked_if_needed()
325 wait_event(fs_info->scrub_pause_wait, in __scrub_blocked_if_needed()
326 atomic_read(&fs_info->scrub_pause_req) == 0); in __scrub_blocked_if_needed()
[all …]
Ddev-replace.h24 int btrfs_init_dev_replace(struct btrfs_fs_info *fs_info);
26 struct btrfs_fs_info *fs_info);
27 void btrfs_after_dev_replace_commit(struct btrfs_fs_info *fs_info);
30 void btrfs_dev_replace_status(struct btrfs_fs_info *fs_info,
32 int btrfs_dev_replace_cancel(struct btrfs_fs_info *fs_info,
34 void btrfs_dev_replace_suspend_for_unmount(struct btrfs_fs_info *fs_info);
35 int btrfs_resume_dev_replace_async(struct btrfs_fs_info *fs_info);
Ddisk-io.h55 struct btrfs_fs_info *fs_info, struct extent_buffer *buf);
66 struct extent_buffer *btrfs_find_tree_block(struct btrfs_fs_info *fs_info,
71 int btrfs_insert_fs_root(struct btrfs_fs_info *fs_info,
73 void btrfs_free_fs_roots(struct btrfs_fs_info *fs_info);
75 struct btrfs_root *btrfs_get_fs_root(struct btrfs_fs_info *fs_info,
79 btrfs_read_fs_root_no_name(struct btrfs_fs_info *fs_info, in btrfs_read_fs_root_no_name() argument
82 return btrfs_get_fs_root(fs_info, location, true); in btrfs_read_fs_root_no_name()
85 int btrfs_cleanup_fs_roots(struct btrfs_fs_info *fs_info);
88 void btrfs_drop_and_free_fs_root(struct btrfs_fs_info *fs_info,
125 int btrfs_wq_submit_bio(struct btrfs_fs_info *fs_info, struct inode *inode,
[all …]
Dvolumes.h257 struct btrfs_fs_info *fs_info; member
304 struct btrfs_fs_info *fs_info; member
409 struct btrfs_fs_info *fs_info; member
424 int btrfs_map_block(struct btrfs_fs_info *fs_info, int rw,
427 int btrfs_map_sblock(struct btrfs_fs_info *fs_info, int rw,
451 struct btrfs_device *btrfs_alloc_device(struct btrfs_fs_info *fs_info,
456 int btrfs_num_copies(struct btrfs_fs_info *fs_info, u64 logical, u64 len);
459 struct btrfs_device *btrfs_find_device(struct btrfs_fs_info *fs_info, u64 devid,
468 int btrfs_resume_balance_async(struct btrfs_fs_info *fs_info);
469 int btrfs_recover_balance(struct btrfs_fs_info *fs_info);
[all …]
Dextent-tree.c232 set_extent_bits(&root->fs_info->freed_extents[0], in add_excluded_extent()
234 set_extent_bits(&root->fs_info->freed_extents[1], in add_excluded_extent()
247 clear_extent_bits(&root->fs_info->freed_extents[0], in free_excluded_extents()
249 clear_extent_bits(&root->fs_info->freed_extents[1], in free_excluded_extents()
272 ret = btrfs_rmap_block(&root->fs_info->mapping_tree, in exclude_super_stripes()
401 struct btrfs_fs_info *fs_info; in caching_thread() local
415 fs_info = block_group->fs_info; in caching_thread()
416 extent_root = fs_info->extent_root; in caching_thread()
449 down_read(&fs_info->commit_root_sem); in caching_thread()
460 if (btrfs_fs_closing(fs_info) > 1) { in caching_thread()
[all …]
Dctree.c42 static int tree_mod_log_free_eb(struct btrfs_fs_info *fs_info,
220 spin_lock(&root->fs_info->trans_lock); in add_root_to_dirty_list()
225 &root->fs_info->dirty_cowonly_roots); in add_root_to_dirty_list()
228 &root->fs_info->dirty_cowonly_roots); in add_root_to_dirty_list()
230 spin_unlock(&root->fs_info->trans_lock); in add_root_to_dirty_list()
249 trans->transid != root->fs_info->running_transaction->transid); in btrfs_copy_root()
275 write_extent_buffer(cow, root->fs_info->fsid, btrfs_header_fsid(), in btrfs_copy_root()
335 static inline void tree_mod_log_read_lock(struct btrfs_fs_info *fs_info) in tree_mod_log_read_lock() argument
337 read_lock(&fs_info->tree_mod_log_lock); in tree_mod_log_read_lock()
340 static inline void tree_mod_log_read_unlock(struct btrfs_fs_info *fs_info) in tree_mod_log_read_unlock() argument
[all …]
Dctree.h1316 struct btrfs_fs_info *fs_info; member
1861 struct btrfs_fs_info *fs_info; member
2194 #define btrfs_test_opt(root, opt) ((root)->fs_info->mount_opt & \
2200 btrfs_info(root->fs_info, fmt, ##args); \
2201 btrfs_set_opt(root->fs_info->mount_opt, opt); \
2207 btrfs_info(root->fs_info, fmt, ##args); \
2208 btrfs_clear_opt(root->fs_info->mount_opt, opt); \
3484 struct btrfs_fs_info *fs_info,
3489 void btrfs_delete_unused_bgs(struct btrfs_fs_info *fs_info);
3547 int btrfs_cond_migrate_bytes(struct btrfs_fs_info *fs_info,
[all …]
Dioctl.c326 if (root->fs_info->compress_type == BTRFS_COMPRESS_LZO) in btrfs_ioctl_setflags()
375 struct btrfs_fs_info *fs_info = btrfs_sb(file_inode(file)->i_sb); in btrfs_ioctl_fitrim() local
381 u64 total_bytes = btrfs_super_total_bytes(fs_info->super_copy); in btrfs_ioctl_fitrim()
388 list_for_each_entry_rcu(device, &fs_info->fs_devices->devices, in btrfs_ioctl_fitrim()
406 range.len < fs_info->sb->s_blocksize) in btrfs_ioctl_fitrim()
411 ret = btrfs_trim_fs(fs_info->tree_root, &range); in btrfs_ioctl_fitrim()
456 ret = btrfs_find_free_objectid(root->fs_info->tree_root, &objectid); in create_subvol()
487 ret = btrfs_qgroup_inherit(trans, root->fs_info, 0, objectid, inherit); in create_subvol()
503 write_extent_buffer(leaf, root->fs_info->fsid, btrfs_header_fsid(), in create_subvol()
505 write_extent_buffer(leaf, root->fs_info->chunk_tree_uuid, in create_subvol()
[all …]
Dbackref.c338 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
[all …]
Ddelayed-ref.c268 struct btrfs_fs_info *fs_info, in btrfs_merge_delayed_refs() argument
284 spin_lock(&fs_info->tree_mod_seq_lock); in btrfs_merge_delayed_refs()
285 if (!list_empty(&fs_info->tree_mod_seq_list)) { in btrfs_merge_delayed_refs()
288 elem = list_first_entry(&fs_info->tree_mod_seq_list, in btrfs_merge_delayed_refs()
292 spin_unlock(&fs_info->tree_mod_seq_lock); in btrfs_merge_delayed_refs()
313 int btrfs_check_delayed_seq(struct btrfs_fs_info *fs_info, in btrfs_check_delayed_seq() argument
320 spin_lock(&fs_info->tree_mod_seq_lock); in btrfs_check_delayed_seq()
321 if (!list_empty(&fs_info->tree_mod_seq_list)) { in btrfs_check_delayed_seq()
322 elem = list_first_entry(&fs_info->tree_mod_seq_list, in btrfs_check_delayed_seq()
333 spin_unlock(&fs_info->tree_mod_seq_lock); in btrfs_check_delayed_seq()
[all …]
Dinode-map.c32 struct btrfs_fs_info *fs_info = root->fs_info; in caching_kthread() local
58 down_read(&fs_info->commit_root_sem); in caching_kthread()
65 if (btrfs_fs_closing(fs_info)) in caching_kthread()
78 btrfs_transaction_in_commit(fs_info)) { in caching_kthread()
91 up_read(&fs_info->commit_root_sem); in caching_kthread()
130 up_read(&fs_info->commit_root_sem); in caching_kthread()
156 ret = load_free_ino_cache(root->fs_info, root); in start_caching()
180 btrfs_warn(root->fs_info, "failed to start inode caching task"); in start_caching()
181 btrfs_clear_pending_and_info(root->fs_info, INODE_MAP_CACHE, in start_caching()
220 down_write(&root->fs_info->commit_root_sem); in btrfs_return_ino()
[all …]
Dtree-log.h45 static inline void btrfs_set_log_full_commit(struct btrfs_fs_info *fs_info, in btrfs_set_log_full_commit() argument
48 ACCESS_ONCE(fs_info->last_trans_log_full_commit) = trans->transid; in btrfs_set_log_full_commit()
51 static inline int btrfs_need_log_full_commit(struct btrfs_fs_info *fs_info, in btrfs_need_log_full_commit() argument
54 return ACCESS_ONCE(fs_info->last_trans_log_full_commit) == in btrfs_need_log_full_commit()
62 struct btrfs_fs_info *fs_info);
Dbackref.h35 int extent_from_logical(struct btrfs_fs_info *fs_info, u64 logical,
43 int iterate_extent_inodes(struct btrfs_fs_info *fs_info,
48 int iterate_inodes_from_logical(u64 logical, struct btrfs_fs_info *fs_info,
55 struct btrfs_fs_info *fs_info, u64 bytenr,
72 struct btrfs_fs_info *fs_info, u64 root_objectid,
Ddelayed-ref.h242 int btrfs_add_delayed_tree_ref(struct btrfs_fs_info *fs_info,
247 int btrfs_add_delayed_data_ref(struct btrfs_fs_info *fs_info,
253 int btrfs_add_delayed_qgroup_reserve(struct btrfs_fs_info *fs_info,
256 int btrfs_add_delayed_extent_op(struct btrfs_fs_info *fs_info,
261 struct btrfs_fs_info *fs_info,
278 int btrfs_check_delayed_seq(struct btrfs_fs_info *fs_info,
Dexport.c62 struct btrfs_fs_info *fs_info = btrfs_sb(sb); in btrfs_get_dentry() local
76 index = srcu_read_lock(&fs_info->subvol_srcu); in btrfs_get_dentry()
78 root = btrfs_read_fs_root_no_name(fs_info, &key); in btrfs_get_dentry()
94 srcu_read_unlock(&fs_info->subvol_srcu, index); in btrfs_get_dentry()
103 srcu_read_unlock(&fs_info->subvol_srcu, index); in btrfs_get_dentry()
172 root = root->fs_info->tree_root; in btrfs_get_parent()
208 return btrfs_get_dentry(root->fs_info->sb, key.objectid, in btrfs_get_parent()
214 return d_obtain_alias(btrfs_iget(root->fs_info->sb, &key, root, NULL)); in btrfs_get_parent()
253 root = root->fs_info->tree_root; in btrfs_get_name()
Duuid-tree.c72 btrfs_warn(uuid_root->fs_info, "uuid item with illegal size %lu!", in btrfs_uuid_tree_lookup()
140 btrfs_warn(uuid_root->fs_info, "insert uuid item failed %d " in btrfs_uuid_tree_add()
187 btrfs_warn(uuid_root->fs_info, "error %d while searching for uuid item!", in btrfs_uuid_tree_rem()
201 btrfs_warn(uuid_root->fs_info, "uuid item with illegal size %lu!", in btrfs_uuid_tree_rem()
258 int btrfs_uuid_tree_iterate(struct btrfs_fs_info *fs_info, in btrfs_uuid_tree_iterate() argument
262 struct btrfs_root *root = fs_info->uuid_root; in btrfs_uuid_tree_iterate()
302 btrfs_warn(fs_info, "uuid item with illegal size %lu!", in btrfs_uuid_tree_iterate()
316 ret = check_func(fs_info, uuid, key.type, subid_cpu); in btrfs_uuid_tree_iterate()
352 btrfs_warn(fs_info, "btrfs_uuid_tree_iterate failed %d", ret); in btrfs_uuid_tree_iterate()
Dordered-data.c68 struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb); in ordered_data_tree_panic() local
69 btrfs_panic(fs_info, errno, "Inconsistency in ordered tree at offset " in ordered_data_tree_panic()
236 spin_lock(&root->fs_info->ordered_root_lock); in __btrfs_add_ordered_extent()
239 &root->fs_info->ordered_roots); in __btrfs_add_ordered_extent()
240 spin_unlock(&root->fs_info->ordered_root_lock); in __btrfs_add_ordered_extent()
333 btrfs_crit(BTRFS_I(inode)->root->fs_info, in btrfs_dec_test_first_ordered_pending()
338 btrfs_crit(BTRFS_I(inode)->root->fs_info, in btrfs_dec_test_first_ordered_pending()
405 btrfs_crit(BTRFS_I(inode)->root->fs_info, in btrfs_dec_test_ordered_pending()
620 spin_lock(&root->fs_info->trans_lock); in btrfs_remove_ordered_extent()
621 trans = root->fs_info->running_transaction; in btrfs_remove_ordered_extent()
[all …]
Dfile-item.c98 u16 csum_size = btrfs_super_csum_size(root->fs_info->super_copy); in btrfs_lookup_csum()
118 root->fs_info->sb->s_blocksize_bits; in btrfs_lookup_csum()
179 u16 csum_size = btrfs_super_csum_size(root->fs_info->super_copy); in __btrfs_lookup_bio_sums()
238 item = btrfs_lookup_csum(NULL, root->fs_info->csum_root, in __btrfs_lookup_bio_sums()
249 btrfs_info(BTRFS_I(inode)->root->fs_info, in __btrfs_lookup_bio_sums()
320 u16 csum_size = btrfs_super_csum_size(root->fs_info->super_copy); in btrfs_lookup_csums_range()
348 root->fs_info->sb->s_blocksize_bits; in btrfs_lookup_csums_range()
399 root->fs_info->sb->s_blocksize_bits; in btrfs_lookup_csums_range()
401 size >>= root->fs_info->sb->s_blocksize_bits; in btrfs_lookup_csums_range()
522 u16 csum_size = btrfs_super_csum_size(root->fs_info->super_copy); in truncate_one_csum()
[all …]
Dinode.c265 data_len > root->fs_info->max_inline) { in cow_file_range_inline()
278 trans->block_rsv = &root->fs_info->delalloc_block_rsv; in cow_file_range_inline()
421 int compress_type = root->fs_info->compress_type; in compress_file_range()
786 em->bdev = root->fs_info->fs_devices->latest_bdev; in submit_compressed_extents()
972 btrfs_super_total_bytes(root->fs_info->super_copy)); in cow_file_range()
1003 em->bdev = root->fs_info->fs_devices->latest_bdev; in cow_file_range()
1109 if (atomic_sub_return(nr_pages, &root->fs_info->async_delalloc_pages) < in async_cow_submit()
1111 waitqueue_active(&root->fs_info->async_submit_wait)) in async_cow_submit()
1112 wake_up(&root->fs_info->async_submit_wait); in async_cow_submit()
1163 atomic_add(nr_pages, &root->fs_info->async_delalloc_pages); in cow_file_range_async()
[all …]
Dfile.c104 p = &root->fs_info->defrag_inodes.rb_node; in __btrfs_add_inode_defrag()
128 rb_insert_color(&defrag->rb_node, &root->fs_info->defrag_inodes); in __btrfs_add_inode_defrag()
137 if (btrfs_fs_closing(root->fs_info)) in __need_auto_defrag()
174 spin_lock(&root->fs_info->defrag_inodes_lock); in btrfs_add_inode_defrag()
187 spin_unlock(&root->fs_info->defrag_inodes_lock); in btrfs_add_inode_defrag()
209 spin_lock(&root->fs_info->defrag_inodes_lock); in btrfs_requeue_inode_defrag()
211 spin_unlock(&root->fs_info->defrag_inodes_lock); in btrfs_requeue_inode_defrag()
224 btrfs_pick_defrag_inode(struct btrfs_fs_info *fs_info, u64 root, u64 ino) in btrfs_pick_defrag_inode() argument
235 spin_lock(&fs_info->defrag_inodes_lock); in btrfs_pick_defrag_inode()
236 p = fs_info->defrag_inodes.rb_node; in btrfs_pick_defrag_inode()
[all …]
Ddelayed-inode.c84 return root->fs_info->delayed_root; in btrfs_get_delayed_root()
231 delayed_root = node->root->fs_info->delayed_root; in btrfs_next_delayed_node()
260 delayed_root = delayed_node->root->fs_info->delayed_root; in __btrfs_release_delayed_node()
445 atomic_inc(&delayed_node->root->fs_info->delayed_root->items); in __btrfs_add_delayed_item()
481 delayed_root = delayed_item->delayed_node->root->fs_info->delayed_root; in __btrfs_remove_delayed_item()
559 dst_rsv = &root->fs_info->delayed_block_rsv; in btrfs_delayed_item_reserve_metadata()
564 trace_btrfs_space_reservation(root->fs_info, "delayed_item", in btrfs_delayed_item_reserve_metadata()
581 rsv = &root->fs_info->delayed_block_rsv; in btrfs_delayed_item_release_metadata()
582 trace_btrfs_space_reservation(root->fs_info, "delayed_item", in btrfs_delayed_item_release_metadata()
602 dst_rsv = &root->fs_info->delayed_block_rsv; in btrfs_delayed_inode_reserve_metadata()
[all …]
Drelocation.c334 struct btrfs_fs_info *fs_info = NULL; in backref_tree_panic() local
338 fs_info = bnode->root->fs_info; in backref_tree_panic()
339 btrfs_panic(fs_info, errno, "Inconsistency in backref cache " in backref_tree_panic()
539 root->fs_info->running_transaction->transid - 1) in should_ignore_root()
583 static struct btrfs_root *read_fs_root(struct btrfs_fs_info *fs_info, in read_fs_root() argument
595 return btrfs_get_fs_root(fs_info, &key, false); in read_fs_root()
610 root = read_fs_root(rc->extent_root->fs_info, root_objectid); in find_tree_root()
885 root = read_fs_root(rc->extent_root->fs_info, key.offset);
1279 struct reloc_control *rc = root->fs_info->reloc_ctl;
1293 btrfs_panic(root->fs_info, -EEXIST, "Duplicate root found "
[all …]
Dextent_io.c99 btrfs_debug_rl(BTRFS_I(inode)->root->fs_info, in __btrfs_debug_check_extent_io_range()
2097 struct btrfs_fs_info *fs_info = BTRFS_I(inode)->root->fs_info; in repair_io_failure() local
2103 struct btrfs_mapping_tree *map_tree = &fs_info->mapping_tree; in repair_io_failure()
2106 ASSERT(!(fs_info->sb->s_flags & MS_RDONLY)); in repair_io_failure()
2119 ret = btrfs_map_block(fs_info, WRITE, logical, in repair_io_failure()
2144 btrfs_info_rl_in_rcu(fs_info, in repair_io_failure()
2159 if (root->fs_info->sb->s_flags & MS_RDONLY) in repair_eb_io_failure()
2165 ret = repair_io_failure(root->fs_info->btree_inode, start, in repair_eb_io_failure()
2186 struct btrfs_fs_info *fs_info = BTRFS_I(inode)->root->fs_info; in clean_io_failure() local
2211 if (fs_info->sb->s_flags & MS_RDONLY) in clean_io_failure()
[all …]
Dtree-log.c148 if (btrfs_need_log_full_commit(root->fs_info, trans)) { in start_log_trans()
160 mutex_lock(&root->fs_info->tree_log_mutex); in start_log_trans()
161 if (!root->fs_info->log_root_tree) in start_log_trans()
162 ret = btrfs_init_log_root_tree(trans, root->fs_info); in start_log_trans()
163 mutex_unlock(&root->fs_info->tree_log_mutex); in start_log_trans()
299 if (btrfs_fs_incompat(log->fs_info, MIXED_GROUPS)) { in process_one_buffer()
306 ret = btrfs_pin_extent_for_log_replay(log->fs_info->extent_root, in process_one_buffer()
555 inode = btrfs_iget(root->fs_info->sb, &key, root, NULL); in read_one_inode()
783 root->fs_info->csum_root, in replay_one_extent()
788 root->fs_info->csum_root, in replay_one_extent()
[all …]
Droot-tree.c48 btrfs_warn(eb->fs_info, in btrfs_read_root_item()
159 btrfs_crit(root->fs_info, "unable to update root key %llu %u %llu", in btrfs_update_root()
234 if (tree_root->fs_info->sb->s_flags & MS_RDONLY) in btrfs_find_orphan_roots()
287 btrfs_std_error(tree_root->fs_info, err, in btrfs_find_orphan_roots()
296 btrfs_std_error(tree_root->fs_info, err, in btrfs_find_orphan_roots()
312 err = btrfs_insert_fs_root(root->fs_info, root); in btrfs_find_orphan_roots()
Draid56.c71 struct btrfs_fs_info *fs_info; member
361 table = rbio->fs_info->stripe_hash_table; in __remove_rbio_from_cache()
416 table = rbio->fs_info->stripe_hash_table; in remove_rbio_from_cache()
476 table = rbio->fs_info->stripe_hash_table; in cache_rbio()
661 struct btrfs_stripe_hash *h = rbio->fs_info->stripe_hash_table->table + bucket; in lock_stripe_add()
755 h = rbio->fs_info->stripe_hash_table->table + bucket; in unlock_stripe()
872 btrfs_bio_counter_sub(rbio->fs_info, rbio->generic_bio_cnt); in rbio_orig_end_io()
982 rbio->fs_info = root->fs_info; in alloc_rbio()
1489 btrfs_queue_work(rbio->fs_info->rmw_workers, in async_rmw_stripe()
1498 btrfs_queue_work(rbio->fs_info->rmw_workers, in async_read_rebuild()
[all …]
Dfree-space-cache.c77 inode = btrfs_iget(root->fs_info->sb, &location, root, NULL); in __lookup_free_space_inode()
115 btrfs_info(root->fs_info, in lookup_free_space_inode()
395 btrfs_err(BTRFS_I(inode)->root->fs_info, in io_ctl_prepare_pages()
453 btrfs_err_rl(io_ctl->root->fs_info, in io_ctl_check_generation()
509 btrfs_err_rl(io_ctl->root->fs_info, in io_ctl_check_crc()
711 btrfs_info(root->fs_info, in __load_free_space_cache()
718 btrfs_err(root->fs_info, in __load_free_space_cache()
770 btrfs_err(root->fs_info, in __load_free_space_cache()
790 btrfs_err(root->fs_info, in __load_free_space_cache()
826 int load_free_space_cache(struct btrfs_fs_info *fs_info, in load_free_space_cache() argument
[all …]
Dcompression.c91 u16 csum_size = btrfs_super_csum_size(root->fs_info->super_copy); in compressed_bio_size()
127 btrfs_info(BTRFS_I(inode)->root->fs_info, in check_compressed_csum()
359 bdev = BTRFS_I(inode)->root->fs_info->fs_devices->latest_bdev; in btrfs_submit_compressed_write()
394 ret = btrfs_bio_wq_end_io(root->fs_info, bio, in btrfs_submit_compressed_write()
416 btrfs_info(BTRFS_I(inode)->root->fs_info, in btrfs_submit_compressed_write()
426 ret = btrfs_bio_wq_end_io(root->fs_info, bio, BTRFS_WQ_ENDIO_DATA); in btrfs_submit_compressed_write()
626 bdev = BTRFS_I(inode)->root->fs_info->fs_devices->latest_bdev; in btrfs_submit_compressed_read()
674 ret = btrfs_bio_wq_end_io(root->fs_info, comp_bio, in btrfs_submit_compressed_read()
715 ret = btrfs_bio_wq_end_io(root->fs_info, comp_bio, in btrfs_submit_compressed_read()
Dextent_io.h129 struct btrfs_fs_info *fs_info; member
283 struct extent_buffer *alloc_extent_buffer(struct btrfs_fs_info *fs_info,
285 struct extent_buffer *alloc_dummy_extent_buffer(struct btrfs_fs_info *fs_info,
288 struct extent_buffer *find_extent_buffer(struct btrfs_fs_info *fs_info,
399 struct extent_buffer *alloc_test_extent_buffer(struct btrfs_fs_info *fs_info,
Dfree-space-cache.h68 int load_free_space_cache(struct btrfs_fs_info *fs_info,
84 int load_free_ino_cache(struct btrfs_fs_info *fs_info,
Ddir-item.c169 if (root == root->fs_info->tree_root) { in btrfs_insert_dir_item()
458 btrfs_crit(root->fs_info, "invalid dir item type: %d", in verify_dir_item()
467 btrfs_crit(root->fs_info, "invalid dir item name len: %u", in verify_dir_item()
475 btrfs_crit(root->fs_info, "invalid dir item name + data len: %u + %u", in verify_dir_item()
Dprops.c279 btrfs_warn(root->fs_info, in inode_prop_iterator()
360 parent_inode = btrfs_iget(parent_root->fs_info->sb, &key, in btrfs_subvol_inherit_props()
365 child_inode = btrfs_iget(root->fs_info->sb, &key, root, NULL); in btrfs_subvol_inherit_props()
Dsend.c1341 down_read(&sctx->send_root->fs_info->commit_root_sem); in find_extent_clone()
1342 ret = extent_from_logical(sctx->send_root->fs_info, disk_byte, tmp_path, in find_extent_clone()
1344 up_read(&sctx->send_root->fs_info->commit_root_sem); in find_extent_clone()
1399 ret = iterate_extent_inodes(sctx->send_root->fs_info, in find_extent_clone()
1409 btrfs_err(sctx->send_root->fs_info, "did not find backref in " in find_extent_clone()
1481 btrfs_err(root->fs_info, in read_symlink()
2016 btrfs_err(sctx->send_root->fs_info, in name_cache_delete()
2328 ret = btrfs_search_slot_for_read(send_root->fs_info->tree_root, in send_subvol_begin()
2577 btrfs_warn(sctx->send_root->fs_info, "unexpected inode type %o", in send_create_inode()
4088 btrfs_err(sctx->send_root->fs_info, in process_all_refs()
[all …]
Dtree-defrag.c44 if (root->fs_info->extent_root == root) { in btrfs_defrag_leaves()
Dprint-tree.c193 btrfs_info(root->fs_info, "leaf %llu total ptrs %d free space %d", in btrfs_print_leaf()
327 btrfs_info(root->fs_info, "node %llu level %d total ptrs %d free spc %u", in btrfs_print_tree()
Dbtrfs_inode.h247 if (root == root->fs_info->tree_root && in btrfs_is_free_space_inode()
Dordered-data.h201 void btrfs_wait_ordered_roots(struct btrfs_fs_info *fs_info, int nr);
Dinode-item.c160 btrfs_std_error(root->fs_info, -ENOENT, NULL); in btrfs_del_inode_extref()
387 struct btrfs_super_block *disk_super = root->fs_info->super_copy; in btrfs_insert_inode_ref()
Dxattr.c488 const struct xattr *xattr_array, void *fs_info) in btrfs_initxattrs() argument
491 struct btrfs_trans_handle *trans = fs_info; in btrfs_initxattrs()
Dtransaction.h225 void btrfs_apply_pending_changes(struct btrfs_fs_info *fs_info);
Dcheck-integrity.c730 btrfs_num_copies(state->root->fs_info, in btrfsic_process_superblock()
848 btrfs_info_in_rcu(device->dev_root->fs_info, in btrfsic_process_superblock_dev_mirror()
904 btrfs_num_copies(state->root->fs_info, in btrfsic_process_superblock_dev_mirror()
1285 btrfs_num_copies(state->root->fs_info, in btrfsic_create_link_to_next_block()
1487 btrfs_num_copies(state->root->fs_info, in btrfsic_handle_extent_data()
1578 ret = btrfs_map_block(state->root->fs_info, READ, in btrfsic_map_block()
1801 if (memcmp(h->fsid, state->root->fs_info->fsid, BTRFS_UUID_SIZE)) in btrfsic_test_for_metadata()
2375 btrfs_num_copies(state->root->fs_info, in btrfsic_process_written_superblock()
2847 num_copies = btrfs_num_copies(state->root->fs_info, in btrfsic_cmp_log_and_dev_bytenr()
/linux-4.4.14/fs/gfs2/
Drecovery.c466 fs_info(sdp, "jid=%u: Trying to acquire journal lock...\n", in gfs2_recover_func()
480 fs_info(sdp, "jid=%u: Busy\n", jd->jd_jid); in gfs2_recover_func()
492 fs_info(sdp, "jid=%u, already locked for use\n", jd->jd_jid); in gfs2_recover_func()
495 fs_info(sdp, "jid=%u: Looking at journal...\n", jd->jd_jid); in gfs2_recover_func()
506 fs_info(sdp, "jid=%u: Acquiring the transaction lock...\n", in gfs2_recover_func()
529 fs_info(sdp, "recovery required on " in gfs2_recover_func()
531 fs_info(sdp, "write access will be " in gfs2_recover_func()
544 fs_info(sdp, "jid=%u: Replaying journal...\n", jd->jd_jid); in gfs2_recover_func()
561 fs_info(sdp, "jid=%u: Journal replayed in %lus\n", in gfs2_recover_func()
572 fs_info(sdp, "jid=%u: Done\n", jd->jd_jid); in gfs2_recover_func()
[all …]
Dlock_dlm.c639 fs_info(sdp, "recover generation %u block1 %u %u\n", in gfs2_control_func()
726 fs_info(sdp, "recover generation %u jid %d\n", in gfs2_control_func()
746 fs_info(sdp, "recover generation %u done\n", start_gen); in gfs2_control_func()
749 fs_info(sdp, "recover generation %u block2 %u %u\n", in gfs2_control_func()
872 fs_info(sdp, "first mounter control generation %u\n", lvb_gen); in control_mount()
888 fs_info(sdp, "control_mount wait for journal recovery\n"); in control_mount()
900 fs_info(sdp, "control_mount wait1 block %u start %u mount %u " in control_mount()
910 fs_info(sdp, "control_mount wait2 block %u start %u mount %u " in control_mount()
919 fs_info(sdp, "control_mount wait3 block %u start %u mount %u " in control_mount()
970 fs_info(sdp, "control_first_done wait gen %u\n", start_gen); in control_first_done()
[all …]
Dlops.c608 fs_info(sdp, "jid=%u: Replayed %u of %u blocks\n", in buf_lo_after_scan()
739 fs_info(sdp, "jid=%u: Found %u revoke tags\n", in revoke_lo_after_scan()
826 fs_info(sdp, "jid=%u: Replayed %u of %u data blocks\n", in databuf_lo_after_scan()
Dops_fstype.c529 fs_info(sdp, "first mount done, others may mount\n"); in gfs2_others_may_mount()
960 fs_info(sdp, "Trying to join cluster \"%s\", \"%s\"\n", proto, table); in gfs2_lm_mount()
994 fs_info(sdp, "unknown hostdata (%s)\n", o); in gfs2_lm_mount()
1000 fs_info(sdp, "Now mounting FS...\n"); in gfs2_lm_mount()
1006 fs_info(sdp, "Joined cluster. Now mounting FS...\n"); in gfs2_lm_mount()
Dutil.h28 #define fs_info(fs, fmt, ...) \ macro
Dsys.c275 fs_info(sdp, "demote interface used\n"); in demote_rq_store()
Dquota.c1130 fs_info(sdp, "quota %s for %s %u\n", in print_message()
1392 fs_info(sdp, "found %u quota changes\n", found); in gfs2_quota_init()
Dbmap.c1430 fs_info(sdp, "journal %d mapped with %u extents\n", jd->jd_jid, in gfs2_map_journal_extents()
Dinode.c556 void *fs_info) in gfs2_initxattrs() argument
/linux-4.4.14/arch/s390/hypfs/
Dinode.c118 struct hypfs_sb_info *fs_info; in hypfs_open() local
129 fs_info = inode->i_sb->s_fs_info; in hypfs_open()
131 mutex_lock(&fs_info->lock); in hypfs_open()
134 mutex_unlock(&fs_info->lock); in hypfs_open()
137 mutex_unlock(&fs_info->lock); in hypfs_open()
166 struct hypfs_sb_info *fs_info = sb->s_fs_info; in hypfs_write_iter() local
179 mutex_lock(&fs_info->lock); in hypfs_write_iter()
180 if (fs_info->last_update == get_seconds()) { in hypfs_write_iter()
198 mutex_unlock(&fs_info->lock); in hypfs_write_iter()
/linux-4.4.14/fs/ext4/
Dxattr_security.c55 void *fs_info) in ext4_initxattrs() argument
58 handle_t *handle = fs_info; in ext4_initxattrs()
/linux-4.4.14/fs/jffs2/
Dsecurity.c27 const struct xattr *xattr_array, void *fs_info) in jffs2_initxattrs() argument
/linux-4.4.14/fs/hfsplus/
Dxattr_security.c36 void *fs_info) in hfsplus_initxattrs() argument
/linux-4.4.14/fs/ext2/
Dxattr_security.c49 void *fs_info) in ext2_initxattrs() argument
/linux-4.4.14/fs/
Dproc_namespace.c44 static const struct proc_fs_info fs_info[] = { in show_sb_opts() local
53 for (fs_infop = fs_info; fs_infop->flag; fs_infop++) { in show_sb_opts()
/linux-4.4.14/include/trace/events/
Dbtrfs.h81 __entry->generation = root->fs_info->generation;
720 TP_PROTO(struct btrfs_fs_info *fs_info, char *type, u64 val,
723 TP_ARGS(fs_info, type, val, bytes, reserve),
734 memcpy(__entry->fsid, fs_info->fsid, BTRFS_UUID_SIZE);
/linux-4.4.14/fs/jfs/
Dxattr.c1074 void *fs_info) in jfs_initxattrs() argument
1077 tid_t *tid = fs_info; in jfs_initxattrs()
/linux-4.4.14/fs/ubifs/
Dxattr.c592 void *fs_info) in init_xattrs() argument
/linux-4.4.14/fs/xfs/
Dxfs_iops.c65 void *fs_info) in xfs_initxattrs() argument
/linux-4.4.14/mm/
Dshmem.c2525 void *fs_info) in shmem_initxattrs() argument
/linux-4.4.14/fs/ocfs2/
Dxattr.c7266 void *fs_info) in ocfs2_initxattrs() argument