Home
last modified time | relevance | path

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

1234

/Linux-v4.19/fs/btrfs/
Ddisk-io.c57 struct btrfs_fs_info *fs_info);
59 static int btrfs_destroy_marked_extents(struct btrfs_fs_info *fs_info,
62 static int btrfs_destroy_pinned_extent(struct btrfs_fs_info *fs_info,
64 static int btrfs_cleanup_transaction(struct btrfs_fs_info *fs_info);
65 static void btrfs_error_commit_super(struct btrfs_fs_info *fs_info);
209 struct btrfs_fs_info *fs_info = inode->root->fs_info; in btree_get_extent() local
217 em->bdev = fs_info->fs_devices->latest_bdev; in btree_get_extent()
232 em->bdev = fs_info->fs_devices->latest_bdev; in btree_get_extent()
265 static int csum_tree_block(struct btrfs_fs_info *fs_info, in csum_tree_block() argument
269 u16 csum_size = btrfs_super_csum_size(fs_info->super_copy); in csum_tree_block()
[all …]
Dtransaction.c49 btrfs_err(transaction->fs_info, in btrfs_put_transaction()
112 struct btrfs_fs_info *fs_info = trans->fs_info; in switch_commit_roots() local
115 down_write(&fs_info->commit_root_sem); in switch_commit_roots()
133 btrfs_drop_and_free_fs_root(fs_info, root); in switch_commit_roots()
137 up_write(&fs_info->commit_root_sem); in switch_commit_roots()
168 static noinline int join_transaction(struct btrfs_fs_info *fs_info, in join_transaction() argument
173 spin_lock(&fs_info->trans_lock); in join_transaction()
176 if (test_bit(BTRFS_FS_STATE_ERROR, &fs_info->fs_state)) { in join_transaction()
177 spin_unlock(&fs_info->trans_lock); in join_transaction()
181 cur_trans = fs_info->running_transaction; in join_transaction()
[all …]
Dqgroup.c68 static void qgroup_rsv_add(struct btrfs_fs_info *fs_info, in qgroup_rsv_add() argument
72 trace_qgroup_update_reserve(fs_info, qgroup, num_bytes, type); in qgroup_rsv_add()
76 static void qgroup_rsv_release(struct btrfs_fs_info *fs_info, in qgroup_rsv_release() argument
80 trace_qgroup_update_reserve(fs_info, qgroup, -(s64)num_bytes, type); in qgroup_rsv_release()
94 static void qgroup_rsv_add_by_qgroup(struct btrfs_fs_info *fs_info, in qgroup_rsv_add_by_qgroup() argument
101 qgroup_rsv_add(fs_info, dest, src->rsv.values[i], i); in qgroup_rsv_add_by_qgroup()
104 static void qgroup_rsv_release_by_qgroup(struct btrfs_fs_info *fs_info, in qgroup_rsv_release_by_qgroup() argument
111 qgroup_rsv_release(fs_info, dest, src->rsv.values[i], i); in qgroup_rsv_release_by_qgroup()
165 qgroup_rescan_init(struct btrfs_fs_info *fs_info, u64 progress_objectid,
167 static void qgroup_rescan_zero_tracking(struct btrfs_fs_info *fs_info);
[all …]
Ddev-replace.c24 static int btrfs_dev_replace_finishing(struct btrfs_fs_info *fs_info,
27 struct btrfs_fs_info *fs_info,
32 int btrfs_init_dev_replace(struct btrfs_fs_info *fs_info) in btrfs_init_dev_replace() argument
35 struct btrfs_root *dev_root = fs_info->dev_root; in btrfs_init_dev_replace()
36 struct btrfs_dev_replace *dev_replace = &fs_info->dev_replace; in btrfs_init_dev_replace()
83 btrfs_warn(fs_info, in btrfs_init_dev_replace()
115 dev_replace->srcdev = btrfs_find_device(fs_info, src_devid, in btrfs_init_dev_replace()
117 dev_replace->tgtdev = btrfs_find_device(fs_info, in btrfs_init_dev_replace()
125 !btrfs_test_opt(fs_info, DEGRADED)) { in btrfs_init_dev_replace()
127 btrfs_warn(fs_info, in btrfs_init_dev_replace()
[all …]
Dtree-checker.c46 static void generic_err(const struct btrfs_fs_info *fs_info, in generic_err() argument
58 btrfs_crit(fs_info, in generic_err()
71 static void file_extent_err(const struct btrfs_fs_info *fs_info, in file_extent_err() argument
85 btrfs_crit(fs_info, in file_extent_err()
97 #define CHECK_FE_ALIGNED(fs_info, leaf, slot, fi, name, alignment) \ argument
100 file_extent_err((fs_info), (leaf), (slot), \
107 static int check_extent_data_item(struct btrfs_fs_info *fs_info, in check_extent_data_item() argument
112 u32 sectorsize = fs_info->sectorsize; in check_extent_data_item()
116 file_extent_err(fs_info, leaf, slot, in check_extent_data_item()
125 file_extent_err(fs_info, leaf, slot, in check_extent_data_item()
[all …]
Dreada.c79 struct btrfs_fs_info *fs_info; member
85 static void reada_start_machine(struct btrfs_fs_info *fs_info);
86 static void __reada_start_machine(struct btrfs_fs_info *fs_info);
93 static void __readahead_hook(struct btrfs_fs_info *fs_info, in __readahead_hook() argument
158 btrfs_debug(fs_info, in __readahead_hook()
191 reada_extent_put(fs_info, re); /* one ref for each entry */ in __readahead_hook()
199 struct btrfs_fs_info *fs_info = eb->fs_info; in btree_readahead_hook() local
204 spin_lock(&fs_info->reada_lock); in btree_readahead_hook()
205 re = radix_tree_lookup(&fs_info->reada_tree, in btree_readahead_hook()
209 spin_unlock(&fs_info->reada_lock); in btree_readahead_hook()
[all …]
Dvolumes.c127 struct btrfs_fs_info *fs_info);
128 static int btrfs_relocate_sys_chunks(struct btrfs_fs_info *fs_info);
132 static int __btrfs_map_block(struct btrfs_fs_info *fs_info,
446 struct btrfs_fs_info *fs_info = device->fs_info; in run_scheduled_bios() local
565 fs_info->fs_devices->open_devices > 1) { in run_scheduled_bios()
598 btrfs_queue_work(fs_info->submit_workers, in run_scheduled_bios()
1264 struct btrfs_fs_info *fs_info = device->fs_info; in contains_pending_extent() local
1266 struct list_head *search_list = &fs_info->pinned_chunks; in contains_pending_extent()
1306 if (search_list != &fs_info->pinned_chunks) { in contains_pending_extent()
1307 search_list = &fs_info->pinned_chunks; in contains_pending_extent()
[all …]
Dref-verify.c218 static void __print_stack_trace(struct btrfs_fs_info *fs_info, in __print_stack_trace() argument
224 btrfs_err(fs_info, " ref-verify: no stacktrace"); in __print_stack_trace()
236 static void inline __print_stack_trace(struct btrfs_fs_info *fs_info, in __print_stack_trace() argument
239 btrfs_err(fs_info, " ref-verify: no stacktrace support"); in __print_stack_trace()
271 static struct block_entry *add_block_entry(struct btrfs_fs_info *fs_info, in add_block_entry() argument
291 spin_lock(&fs_info->ref_verify_lock); in add_block_entry()
292 exist = insert_block_entry(&fs_info->block_tree, be); in add_block_entry()
318 static int add_tree_block(struct btrfs_fs_info *fs_info, u64 ref_root, in add_tree_block() argument
338 be = add_block_entry(fs_info, bytenr, fs_info->nodesize, ref_root); in add_tree_block()
358 spin_unlock(&fs_info->ref_verify_lock); in add_tree_block()
[all …]
Ddisk-io.h42 struct extent_buffer *read_tree_block(struct btrfs_fs_info *fs_info, u64 bytenr,
45 void readahead_tree_block(struct btrfs_fs_info *fs_info, u64 bytenr);
46 int reada_tree_block_flagged(struct btrfs_fs_info *fs_info, u64 bytenr,
49 struct btrfs_fs_info *fs_info,
51 void clean_tree_block(struct btrfs_fs_info *fs_info, struct extent_buffer *buf);
55 void close_ctree(struct btrfs_fs_info *fs_info);
56 int write_all_supers(struct btrfs_fs_info *fs_info, int max_mirrors);
60 int btrfs_commit_super(struct btrfs_fs_info *fs_info);
64 struct btrfs_root *btrfs_lookup_fs_root(struct btrfs_fs_info *fs_info,
66 int btrfs_insert_fs_root(struct btrfs_fs_info *fs_info,
[all …]
Dsysfs.c23 static u64 get_features(struct btrfs_fs_info *fs_info, in get_features() argument
26 struct btrfs_super_block *disk_super = fs_info->super_copy; in get_features()
35 static void set_features(struct btrfs_fs_info *fs_info, in set_features() argument
38 struct btrfs_super_block *disk_super = fs_info->super_copy; in set_features()
82 struct btrfs_fs_info *fs_info = to_fs_info(kobj); in btrfs_feature_attr_show() local
84 if (fs_info) { in btrfs_feature_attr_show()
85 u64 features = get_features(fs_info, fa->feature_set); in btrfs_feature_attr_show()
98 struct btrfs_fs_info *fs_info; in btrfs_feature_attr_store() local
104 fs_info = to_fs_info(kobj); in btrfs_feature_attr_store()
105 if (!fs_info) in btrfs_feature_attr_store()
[all …]
Dextent-tree.c73 static void dump_space_info(struct btrfs_fs_info *fs_info,
78 static void space_info_add_new_bytes(struct btrfs_fs_info *fs_info,
81 static void space_info_add_old_bytes(struct btrfs_fs_info *fs_info,
209 static int add_excluded_extent(struct btrfs_fs_info *fs_info, in add_excluded_extent() argument
213 set_extent_bits(&fs_info->freed_extents[0], in add_excluded_extent()
215 set_extent_bits(&fs_info->freed_extents[1], in add_excluded_extent()
222 struct btrfs_fs_info *fs_info = cache->fs_info; in free_excluded_extents() local
228 clear_extent_bits(&fs_info->freed_extents[0], in free_excluded_extents()
230 clear_extent_bits(&fs_info->freed_extents[1], in free_excluded_extents()
236 struct btrfs_fs_info *fs_info = cache->fs_info; in exclude_super_stripes() local
[all …]
Dsuper.c99 void __btrfs_handle_fs_error(struct btrfs_fs_info *fs_info, const char *function, in __btrfs_handle_fs_error() argument
102 struct super_block *sb = fs_info->sb; in __btrfs_handle_fs_error()
137 set_bit(BTRFS_FS_STATE_ERROR, &fs_info->fs_state); in __btrfs_handle_fs_error()
148 btrfs_info(fs_info, "forced readonly"); in __btrfs_handle_fs_error()
187 void btrfs_printk(const struct btrfs_fs_info *fs_info, const char *fmt, ...) in btrfs_printk() argument
215 fs_info ? fs_info->sb->s_id : "<unknown>", &vaf); in btrfs_printk()
239 struct btrfs_fs_info *fs_info = trans->fs_info; in __btrfs_abort_transaction() local
248 btrfs_warn(fs_info, in __btrfs_abort_transaction()
255 wake_up(&fs_info->transaction_wait); in __btrfs_abort_transaction()
256 wake_up(&fs_info->transaction_blocked_wait); in __btrfs_abort_transaction()
[all …]
Dscrub.c154 struct btrfs_fs_info *fs_info; member
212 static void scrub_recheck_block(struct btrfs_fs_info *fs_info,
242 static void scrub_remap_extent(struct btrfs_fs_info *fs_info,
252 static void __scrub_blocked_if_needed(struct btrfs_fs_info *fs_info);
253 static void scrub_blocked_if_needed(struct btrfs_fs_info *fs_info);
275 static void __scrub_blocked_if_needed(struct btrfs_fs_info *fs_info) in __scrub_blocked_if_needed() argument
277 while (atomic_read(&fs_info->scrub_pause_req)) { in __scrub_blocked_if_needed()
278 mutex_unlock(&fs_info->scrub_lock); in __scrub_blocked_if_needed()
279 wait_event(fs_info->scrub_pause_wait, in __scrub_blocked_if_needed()
280 atomic_read(&fs_info->scrub_pause_req) == 0); in __scrub_blocked_if_needed()
[all …]
Dctree.h347 #define BTRFS_MAX_EXTENT_ITEM_SIZE(r) ((BTRFS_LEAF_DATA_SIZE(r->fs_info) >> 4) - \
547 struct btrfs_fs_info *fs_info; member
568 struct btrfs_fs_info *fs_info; member
1174 struct btrfs_fs_info *fs_info; member
1372 #define btrfs_test_opt(fs_info, opt) ((fs_info)->mount_opt & \ argument
1375 #define btrfs_set_and_info(fs_info, opt, fmt, args...) \ argument
1377 if (!btrfs_test_opt(fs_info, opt)) \
1378 btrfs_info(fs_info, fmt, ##args); \
1379 btrfs_set_opt(fs_info->mount_opt, opt); \
1382 #define btrfs_clear_and_info(fs_info, opt, fmt, args...) \ argument
[all …]
Dvolumes.h49 struct btrfs_fs_info *fs_info; member
246 struct btrfs_fs_info *fs_info; member
298 struct btrfs_fs_info *fs_info; member
390 int btrfs_map_block(struct btrfs_fs_info *fs_info, enum btrfs_map_op op,
393 int btrfs_map_sblock(struct btrfs_fs_info *fs_info, enum btrfs_map_op op,
396 int btrfs_rmap_block(struct btrfs_fs_info *fs_info, u64 chunk_start,
398 int btrfs_read_sys_array(struct btrfs_fs_info *fs_info);
399 int btrfs_read_chunk_tree(struct btrfs_fs_info *fs_info);
403 blk_status_t btrfs_map_bio(struct btrfs_fs_info *fs_info, struct bio *bio,
413 int btrfs_find_device_missing_or_by_path(struct btrfs_fs_info *fs_info,
[all …]
Dinode-map.c18 struct btrfs_fs_info *fs_info = root->fs_info; in caching_kthread() local
27 if (!btrfs_test_opt(fs_info, INODE_MAP_CACHE)) in caching_kthread()
44 down_read(&fs_info->commit_root_sem); in caching_kthread()
51 if (btrfs_fs_closing(fs_info)) in caching_kthread()
64 btrfs_transaction_in_commit(fs_info)) { in caching_kthread()
77 up_read(&fs_info->commit_root_sem); in caching_kthread()
93 __btrfs_add_free_space(fs_info, ctl, last + 1, in caching_kthread()
104 __btrfs_add_free_space(fs_info, ctl, last + 1, in caching_kthread()
116 up_read(&fs_info->commit_root_sem); in caching_kthread()
125 struct btrfs_fs_info *fs_info = root->fs_info; in start_caching() local
[all …]
Dctree.c22 struct btrfs_fs_info *fs_info,
26 struct btrfs_fs_info *fs_info,
201 struct btrfs_fs_info *fs_info = root->fs_info; in add_root_to_dirty_list() local
207 spin_lock(&fs_info->trans_lock); in add_root_to_dirty_list()
212 &fs_info->dirty_cowonly_roots); in add_root_to_dirty_list()
215 &fs_info->dirty_cowonly_roots); in add_root_to_dirty_list()
217 spin_unlock(&fs_info->trans_lock); in add_root_to_dirty_list()
230 struct btrfs_fs_info *fs_info = root->fs_info; in btrfs_copy_root() local
237 trans->transid != fs_info->running_transaction->transid); in btrfs_copy_root()
263 write_extent_buffer_fsid(cow, fs_info->fsid); in btrfs_copy_root()
[all …]
Dref-verify.h10 int btrfs_build_ref_tree(struct btrfs_fs_info *fs_info);
11 void btrfs_free_ref_cache(struct btrfs_fs_info *fs_info);
15 void btrfs_free_ref_tree_range(struct btrfs_fs_info *fs_info, u64 start,
18 static inline void btrfs_init_ref_verify(struct btrfs_fs_info *fs_info) in btrfs_init_ref_verify() argument
20 spin_lock_init(&fs_info->ref_verify_lock); in btrfs_init_ref_verify()
21 fs_info->block_tree = RB_ROOT; in btrfs_init_ref_verify()
24 static inline int btrfs_build_ref_tree(struct btrfs_fs_info *fs_info) in btrfs_build_ref_tree() argument
29 static inline void btrfs_free_ref_cache(struct btrfs_fs_info *fs_info) in btrfs_free_ref_cache() argument
40 static inline void btrfs_free_ref_tree_range(struct btrfs_fs_info *fs_info, in btrfs_free_ref_tree_range() argument
45 static inline void btrfs_init_ref_verify(struct btrfs_fs_info *fs_info) in btrfs_init_ref_verify() argument
Dfile-item.c24 #define MAX_ORDERED_SUM_BYTES(fs_info) ((PAGE_SIZE - \ argument
26 sizeof(u32) * (fs_info)->sectorsize)
80 struct btrfs_fs_info *fs_info = root->fs_info; in btrfs_lookup_csum() local
87 u16 csum_size = btrfs_super_csum_size(fs_info->super_copy); in btrfs_lookup_csum()
107 fs_info->sb->s_blocksize_bits; in btrfs_lookup_csum()
153 struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb); in __btrfs_lookup_bio_sums() local
169 u16 csum_size = btrfs_super_csum_size(fs_info->super_copy); in __btrfs_lookup_bio_sums()
231 item = btrfs_lookup_csum(NULL, fs_info->csum_root, in __btrfs_lookup_bio_sums()
239 offset + fs_info->sectorsize - 1, in __btrfs_lookup_bio_sums()
242 btrfs_info_rl(fs_info, in __btrfs_lookup_bio_sums()
[all …]
Ddev-replace.h11 int btrfs_init_dev_replace(struct btrfs_fs_info *fs_info);
13 struct btrfs_fs_info *fs_info);
14 void btrfs_after_dev_replace_commit(struct btrfs_fs_info *fs_info);
15 int btrfs_dev_replace_by_ioctl(struct btrfs_fs_info *fs_info,
17 int btrfs_dev_replace_start(struct btrfs_fs_info *fs_info,
20 void btrfs_dev_replace_status(struct btrfs_fs_info *fs_info,
22 int btrfs_dev_replace_cancel(struct btrfs_fs_info *fs_info);
23 void btrfs_dev_replace_suspend_for_unmount(struct btrfs_fs_info *fs_info);
24 int btrfs_resume_dev_replace_async(struct btrfs_fs_info *fs_info);
/Linux-v4.19/fs/btrfs/tests/
Dbtrfs-tests.c71 struct btrfs_fs_info *fs_info = kzalloc(sizeof(struct btrfs_fs_info), in btrfs_alloc_dummy_fs_info() local
74 if (!fs_info) in btrfs_alloc_dummy_fs_info()
75 return fs_info; in btrfs_alloc_dummy_fs_info()
76 fs_info->fs_devices = kzalloc(sizeof(struct btrfs_fs_devices), in btrfs_alloc_dummy_fs_info()
78 if (!fs_info->fs_devices) { in btrfs_alloc_dummy_fs_info()
79 kfree(fs_info); in btrfs_alloc_dummy_fs_info()
82 fs_info->super_copy = kzalloc(sizeof(struct btrfs_super_block), in btrfs_alloc_dummy_fs_info()
84 if (!fs_info->super_copy) { in btrfs_alloc_dummy_fs_info()
85 kfree(fs_info->fs_devices); in btrfs_alloc_dummy_fs_info()
86 kfree(fs_info); in btrfs_alloc_dummy_fs_info()
[all …]
Dqgroup-tests.c211 struct btrfs_fs_info *fs_info = root->fs_info; in test_no_shared_qgroup() local
216 btrfs_init_dummy_trans(&trans, fs_info); in test_no_shared_qgroup()
230 ret = btrfs_find_all_roots(&trans, fs_info, nodesize, 0, &old_roots, in test_no_shared_qgroup()
243 ret = btrfs_find_all_roots(&trans, fs_info, nodesize, 0, &new_roots, in test_no_shared_qgroup()
259 if (btrfs_verify_qgroup_counts(fs_info, BTRFS_FS_TREE_OBJECTID, in test_no_shared_qgroup()
267 ret = btrfs_find_all_roots(&trans, fs_info, nodesize, 0, &old_roots, in test_no_shared_qgroup()
279 ret = btrfs_find_all_roots(&trans, fs_info, nodesize, 0, &new_roots, in test_no_shared_qgroup()
295 if (btrfs_verify_qgroup_counts(fs_info, BTRFS_FS_TREE_OBJECTID, 0, 0)) { in test_no_shared_qgroup()
312 struct btrfs_fs_info *fs_info = root->fs_info; in test_multiple_refs() local
317 btrfs_init_dummy_trans(&trans, fs_info); in test_multiple_refs()
[all …]
Dfree-space-tree-tests.c19 struct btrfs_fs_info *fs_info, in __check_free_space_extents() argument
33 info = search_free_space_info(trans, fs_info, cache, path, 0); in __check_free_space_extents()
71 offset += fs_info->sectorsize; in __check_free_space_extents()
108 struct btrfs_fs_info *fs_info, in check_free_space_extents() argument
118 info = search_free_space_info(trans, fs_info, cache, path, 0); in check_free_space_extents()
127 ret = __check_free_space_extents(trans, fs_info, cache, path, extents, in check_free_space_extents()
146 return __check_free_space_extents(trans, fs_info, cache, path, extents, in check_free_space_extents()
151 struct btrfs_fs_info *fs_info, in test_empty_block_group() argument
160 return check_free_space_extents(trans, fs_info, cache, path, in test_empty_block_group()
165 struct btrfs_fs_info *fs_info, in test_remove_all() argument
[all …]
Dextent-map-tests.c50 static void test_case_1(struct btrfs_fs_info *fs_info, in test_case_1() argument
94 ret = btrfs_add_extent_mapping(fs_info, em_tree, &em, em->start, em->len); in test_case_1()
116 static void test_case_2(struct btrfs_fs_info *fs_info, in test_case_2() argument
158 ret = btrfs_add_extent_mapping(fs_info, em_tree, &em, em->start, em->len); in test_case_2()
174 static void __test_case_3(struct btrfs_fs_info *fs_info, in __test_case_3() argument
204 ret = btrfs_add_extent_mapping(fs_info, em_tree, &em, start, len); in __test_case_3()
241 static void test_case_3(struct btrfs_fs_info *fs_info, in test_case_3() argument
244 __test_case_3(fs_info, em_tree, 0); in test_case_3()
245 __test_case_3(fs_info, em_tree, SZ_8K); in test_case_3()
246 __test_case_3(fs_info, em_tree, (12 * 1024ULL)); in test_case_3()
[all …]
/Linux-v4.19/include/trace/events/
Dbtrfs.h94 #define TP_fast_assign_fsid(fs_info) \ argument
95 memcpy(__entry->fsid, fs_info->fsid, BTRFS_FSID_SIZE)
101 #define TP_fast_assign_btrfs(fs_info, args...) \ argument
103 TP_fast_assign_fsid(fs_info); \
119 TP_fast_assign_btrfs(root->fs_info,
120 __entry->generation = root->fs_info->generation;
229 TP_fast_assign_btrfs(root->fs_info,
259 TP_PROTO(struct btrfs_fs_info *fs_info,
263 TP_ARGS(fs_info, existing, map, start, len),
274 TP_fast_assign_btrfs(fs_info,
[all …]

1234