Home
last modified time | relevance | path

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

12345

/linux-6.1.9/fs/btrfs/
Ddisk-io.c56 struct btrfs_fs_info *fs_info);
58 static int btrfs_destroy_marked_extents(struct btrfs_fs_info *fs_info,
61 static int btrfs_destroy_pinned_extent(struct btrfs_fs_info *fs_info,
63 static int btrfs_cleanup_transaction(struct btrfs_fs_info *fs_info);
64 static void btrfs_error_commit_super(struct btrfs_fs_info *fs_info);
66 static void btrfs_free_csum_hash(struct btrfs_fs_info *fs_info) in btrfs_free_csum_hash() argument
68 if (fs_info->csum_shash) in btrfs_free_csum_hash()
69 crypto_free_shash(fs_info->csum_shash); in btrfs_free_csum_hash()
94 struct btrfs_fs_info *fs_info = buf->fs_info; in csum_tree_block() local
96 const int first_page_part = min_t(u32, PAGE_SIZE, fs_info->nodesize); in csum_tree_block()
[all …]
Dtransaction.c134 btrfs_err(transaction->fs_info, in btrfs_put_transaction()
162 struct btrfs_fs_info *fs_info = trans->fs_info; in switch_commit_roots() local
171 down_write(&fs_info->commit_root_sem); in switch_commit_roots()
173 if (test_bit(BTRFS_FS_RELOC_RUNNING, &fs_info->flags)) in switch_commit_roots()
174 fs_info->last_reloc_trans = trans->transid; in switch_commit_roots()
193 btrfs_drop_and_free_fs_root(fs_info, root); in switch_commit_roots()
198 up_write(&fs_info->commit_root_sem); in switch_commit_roots()
235 struct btrfs_fs_info *fs_info = trans->fs_info; in btrfs_trans_release_chunk_metadata() local
240 btrfs_block_rsv_release(fs_info, &fs_info->chunk_block_rsv, in btrfs_trans_release_chunk_metadata()
248 static noinline int join_transaction(struct btrfs_fs_info *fs_info, in join_transaction() argument
[all …]
Dsubpage.c66 bool btrfs_is_subpage(const struct btrfs_fs_info *fs_info, struct page *page) in btrfs_is_subpage() argument
68 if (fs_info->sectorsize >= PAGE_SIZE) in btrfs_is_subpage()
84 if (fs_info->nodesize < PAGE_SIZE) in btrfs_is_subpage()
120 int btrfs_attach_subpage(const struct btrfs_fs_info *fs_info, in btrfs_attach_subpage() argument
133 if (!btrfs_is_subpage(fs_info, page) || PagePrivate(page)) in btrfs_attach_subpage()
136 subpage = btrfs_alloc_subpage(fs_info, type); in btrfs_attach_subpage()
144 void btrfs_detach_subpage(const struct btrfs_fs_info *fs_info, in btrfs_detach_subpage() argument
150 if (!btrfs_is_subpage(fs_info, page) || !PagePrivate(page)) in btrfs_detach_subpage()
158 struct btrfs_subpage *btrfs_alloc_subpage(const struct btrfs_fs_info *fs_info, in btrfs_alloc_subpage() argument
164 ASSERT(fs_info->sectorsize < PAGE_SIZE); in btrfs_alloc_subpage()
[all …]
Ddelalloc-space.c117 struct btrfs_fs_info *fs_info = root->fs_info; in btrfs_alloc_data_chunk_ondemand() local
121 bytes = ALIGN(bytes, fs_info->sectorsize); in btrfs_alloc_data_chunk_ondemand()
126 return btrfs_reserve_data_bytes(fs_info, bytes, flush); in btrfs_alloc_data_chunk_ondemand()
133 struct btrfs_fs_info *fs_info = inode->root->fs_info; in btrfs_check_data_free_space() local
138 len = round_up(start + len, fs_info->sectorsize) - in btrfs_check_data_free_space()
139 round_down(start, fs_info->sectorsize); in btrfs_check_data_free_space()
140 start = round_down(start, fs_info->sectorsize); in btrfs_check_data_free_space()
147 ret = btrfs_reserve_data_bytes(fs_info, len, flush); in btrfs_check_data_free_space()
154 btrfs_free_reserved_data_space_noquota(fs_info, len); in btrfs_check_data_free_space()
171 void btrfs_free_reserved_data_space_noquota(struct btrfs_fs_info *fs_info, in btrfs_free_reserved_data_space_noquota() argument
[all …]
Dqgroup.c58 static void qgroup_rsv_add(struct btrfs_fs_info *fs_info, in qgroup_rsv_add() argument
62 trace_qgroup_update_reserve(fs_info, qgroup, num_bytes, type); in qgroup_rsv_add()
66 static void qgroup_rsv_release(struct btrfs_fs_info *fs_info, in qgroup_rsv_release() argument
70 trace_qgroup_update_reserve(fs_info, qgroup, -(s64)num_bytes, type); in qgroup_rsv_release()
84 static void qgroup_rsv_add_by_qgroup(struct btrfs_fs_info *fs_info, in qgroup_rsv_add_by_qgroup() argument
91 qgroup_rsv_add(fs_info, dest, src->rsv.values[i], i); in qgroup_rsv_add_by_qgroup()
94 static void qgroup_rsv_release_by_qgroup(struct btrfs_fs_info *fs_info, in qgroup_rsv_release_by_qgroup() argument
101 qgroup_rsv_release(fs_info, dest, src->rsv.values[i], i); in qgroup_rsv_release_by_qgroup()
155 qgroup_rescan_init(struct btrfs_fs_info *fs_info, u64 progress_objectid,
157 static void qgroup_rescan_zero_tracking(struct btrfs_fs_info *fs_info);
[all …]
Dspace-info.c194 static u64 calc_chunk_size(const struct btrfs_fs_info *fs_info, u64 flags) in calc_chunk_size() argument
196 if (btrfs_is_zoned(fs_info)) in calc_chunk_size()
197 return fs_info->zone_size; in calc_chunk_size()
207 if (fs_info->fs_devices->total_rw_bytes > 50ULL * SZ_1G) in calc_chunk_size()
259 int btrfs_init_space_info(struct btrfs_fs_info *fs_info) in btrfs_init_space_info() argument
267 disk_super = fs_info->super_copy; in btrfs_init_space_info()
276 ret = create_space_info(fs_info, flags); in btrfs_init_space_info()
282 ret = create_space_info(fs_info, flags); in btrfs_init_space_info()
285 ret = create_space_info(fs_info, flags); in btrfs_init_space_info()
290 ret = create_space_info(fs_info, flags); in btrfs_init_space_info()
[all …]
Ddev-replace.c67 static int btrfs_dev_replace_finishing(struct btrfs_fs_info *fs_info,
71 int btrfs_init_dev_replace(struct btrfs_fs_info *fs_info) in btrfs_init_dev_replace() argument
75 struct btrfs_root *dev_root = fs_info->dev_root; in btrfs_init_dev_replace()
76 struct btrfs_dev_replace *dev_replace = &fs_info->dev_replace; in btrfs_init_dev_replace()
104 if (btrfs_find_device(fs_info->fs_devices, &args)) { in btrfs_init_dev_replace()
105 btrfs_err(fs_info, in btrfs_init_dev_replace()
135 btrfs_warn(fs_info, in btrfs_init_dev_replace()
166 if (btrfs_find_device(fs_info->fs_devices, &args)) { in btrfs_init_dev_replace()
167 btrfs_err(fs_info, in btrfs_init_dev_replace()
177 dev_replace->tgtdev = btrfs_find_device(fs_info->fs_devices, &args); in btrfs_init_dev_replace()
[all …]
Dblock-rsv.c103 static u64 block_rsv_release_bytes(struct btrfs_fs_info *fs_info, in block_rsv_release_bytes() argument
151 btrfs_space_info_free_bytes_may_use(fs_info, in block_rsv_release_bytes()
181 void btrfs_init_metadata_block_rsv(struct btrfs_fs_info *fs_info, in btrfs_init_metadata_block_rsv() argument
186 rsv->space_info = btrfs_find_space_info(fs_info, in btrfs_init_metadata_block_rsv()
190 struct btrfs_block_rsv *btrfs_alloc_block_rsv(struct btrfs_fs_info *fs_info, in btrfs_alloc_block_rsv() argument
199 btrfs_init_metadata_block_rsv(fs_info, block_rsv, type); in btrfs_alloc_block_rsv()
203 void btrfs_free_block_rsv(struct btrfs_fs_info *fs_info, in btrfs_free_block_rsv() argument
208 btrfs_block_rsv_release(fs_info, rsv, (u64)-1, NULL); in btrfs_free_block_rsv()
212 int btrfs_block_rsv_add(struct btrfs_fs_info *fs_info, in btrfs_block_rsv_add() argument
221 ret = btrfs_reserve_metadata_bytes(fs_info, block_rsv, num_bytes, flush); in btrfs_block_rsv_add()
[all …]
Ddisk-io.h31 void btrfs_check_leaked_roots(struct btrfs_fs_info *fs_info);
32 void btrfs_init_fs_info(struct btrfs_fs_info *fs_info);
35 struct extent_buffer *read_tree_block(struct btrfs_fs_info *fs_info, u64 bytenr,
39 struct btrfs_fs_info *fs_info,
43 void btrfs_clear_oneshot_options(struct btrfs_fs_info *fs_info);
44 int btrfs_start_pre_rw_mount(struct btrfs_fs_info *fs_info);
45 int btrfs_check_super_csum(struct btrfs_fs_info *fs_info,
50 void __cold close_ctree(struct btrfs_fs_info *fs_info);
51 int btrfs_validate_super(struct btrfs_fs_info *fs_info,
53 int btrfs_check_features(struct btrfs_fs_info *fs_info, bool is_rw_mount);
[all …]
Dblock-group.c27 static u64 get_restripe_target(struct btrfs_fs_info *fs_info, u64 flags) in get_restripe_target() argument
29 struct btrfs_balance_control *bctl = fs_info->balance_ctl; in get_restripe_target()
56 static u64 btrfs_reduce_alloc_profile(struct btrfs_fs_info *fs_info, u64 flags) in btrfs_reduce_alloc_profile() argument
58 u64 num_devices = fs_info->fs_devices->rw_devices; in btrfs_reduce_alloc_profile()
67 spin_lock(&fs_info->balance_lock); in btrfs_reduce_alloc_profile()
68 target = get_restripe_target(fs_info, flags); in btrfs_reduce_alloc_profile()
70 spin_unlock(&fs_info->balance_lock); in btrfs_reduce_alloc_profile()
73 spin_unlock(&fs_info->balance_lock); in btrfs_reduce_alloc_profile()
98 u64 btrfs_get_alloc_profile(struct btrfs_fs_info *fs_info, u64 orig_flags) in btrfs_get_alloc_profile() argument
105 seq = read_seqbegin(&fs_info->profiles_lock); in btrfs_get_alloc_profile()
[all …]
Dtree-mod-log.c43 static inline u64 btrfs_inc_tree_mod_seq(struct btrfs_fs_info *fs_info) in btrfs_inc_tree_mod_seq() argument
45 return atomic64_inc_return(&fs_info->tree_mod_seq); in btrfs_inc_tree_mod_seq()
56 u64 btrfs_get_tree_mod_seq(struct btrfs_fs_info *fs_info, in btrfs_get_tree_mod_seq() argument
59 write_lock(&fs_info->tree_mod_log_lock); in btrfs_get_tree_mod_seq()
61 elem->seq = btrfs_inc_tree_mod_seq(fs_info); in btrfs_get_tree_mod_seq()
62 list_add_tail(&elem->list, &fs_info->tree_mod_seq_list); in btrfs_get_tree_mod_seq()
63 set_bit(BTRFS_FS_TREE_MOD_LOG_USERS, &fs_info->flags); in btrfs_get_tree_mod_seq()
65 write_unlock(&fs_info->tree_mod_log_lock); in btrfs_get_tree_mod_seq()
70 void btrfs_put_tree_mod_seq(struct btrfs_fs_info *fs_info, in btrfs_put_tree_mod_seq() argument
83 write_lock(&fs_info->tree_mod_log_lock); in btrfs_put_tree_mod_seq()
[all …]
Dsubpage.h77 bool btrfs_is_subpage(const struct btrfs_fs_info *fs_info, struct page *page);
80 int btrfs_attach_subpage(const struct btrfs_fs_info *fs_info,
82 void btrfs_detach_subpage(const struct btrfs_fs_info *fs_info,
86 struct btrfs_subpage *btrfs_alloc_subpage(const struct btrfs_fs_info *fs_info,
90 void btrfs_page_inc_eb_refs(const struct btrfs_fs_info *fs_info,
92 void btrfs_page_dec_eb_refs(const struct btrfs_fs_info *fs_info,
95 void btrfs_subpage_start_reader(const struct btrfs_fs_info *fs_info,
97 void btrfs_subpage_end_reader(const struct btrfs_fs_info *fs_info,
100 void btrfs_subpage_start_writer(const struct btrfs_fs_info *fs_info,
102 bool btrfs_subpage_end_and_test_writer(const struct btrfs_fs_info *fs_info,
[all …]
Dzoned.h36 int btrfs_get_dev_zone_info_all_devices(struct btrfs_fs_info *fs_info);
40 int btrfs_check_zoned_mode(struct btrfs_fs_info *fs_info);
62 bool btrfs_check_meta_write_pointer(struct btrfs_fs_info *fs_info,
70 struct btrfs_device *btrfs_zoned_get_device(struct btrfs_fs_info *fs_info,
75 void btrfs_zone_finish_endio(struct btrfs_fs_info *fs_info, u64 logical,
80 void btrfs_free_zone_cache(struct btrfs_fs_info *fs_info);
81 bool btrfs_zoned_should_reclaim(struct btrfs_fs_info *fs_info);
82 void btrfs_zoned_release_data_reloc_bg(struct btrfs_fs_info *fs_info, u64 logical,
84 int btrfs_zone_finish_one_bg(struct btrfs_fs_info *fs_info);
85 int btrfs_zoned_activate_one_bg(struct btrfs_fs_info *fs_info,
[all …]
Dsysfs.c118 static u64 get_features(struct btrfs_fs_info *fs_info, in get_features() argument
121 struct btrfs_super_block *disk_super = fs_info->super_copy; in get_features()
130 static void set_features(struct btrfs_fs_info *fs_info, in set_features() argument
133 struct btrfs_super_block *disk_super = fs_info->super_copy; in set_features()
177 struct btrfs_fs_info *fs_info = to_fs_info(kobj); in btrfs_feature_attr_show() local
179 if (fs_info) { in btrfs_feature_attr_show()
180 u64 features = get_features(fs_info, fa->feature_set); in btrfs_feature_attr_show()
193 struct btrfs_fs_info *fs_info; in btrfs_feature_attr_store() local
199 fs_info = to_fs_info(kobj); in btrfs_feature_attr_store()
200 if (!fs_info) in btrfs_feature_attr_store()
[all …]
Dvolumes.c249 static int btrfs_relocate_sys_chunks(struct btrfs_fs_info *fs_info);
251 static int __btrfs_map_block(struct btrfs_fs_info *fs_info,
1147 device->fs_info = NULL; in btrfs_close_one_device()
1187 fs_devices->fs_info = NULL; in close_fs_devices()
1408 lockdep_assert_held(&device->fs_info->chunk_mutex); in contains_pending_extent()
1570 struct btrfs_fs_info *fs_info = device->fs_info; in find_free_dev_extent_start() local
1571 struct btrfs_root *root = fs_info->dev_root; in find_free_dev_extent_start()
1717 struct btrfs_fs_info *fs_info = device->fs_info; in btrfs_free_dev_extent() local
1718 struct btrfs_root *root = fs_info->dev_root; in btrfs_free_dev_extent()
1767 static u64 find_next_chunk(struct btrfs_fs_info *fs_info) in find_next_chunk() argument
[all …]
Dref-verify.c211 static void __print_stack_trace(struct btrfs_fs_info *fs_info, in __print_stack_trace() argument
215 btrfs_err(fs_info, " ref-verify: no stacktrace"); in __print_stack_trace()
225 static inline void __print_stack_trace(struct btrfs_fs_info *fs_info, in __print_stack_trace() argument
228 btrfs_err(fs_info, " ref-verify: no stacktrace support"); in __print_stack_trace()
260 static struct block_entry *add_block_entry(struct btrfs_fs_info *fs_info, in add_block_entry() argument
280 spin_lock(&fs_info->ref_verify_lock); in add_block_entry()
281 exist = insert_block_entry(&fs_info->block_tree, be); in add_block_entry()
309 static int add_tree_block(struct btrfs_fs_info *fs_info, u64 ref_root, in add_tree_block() argument
329 be = add_block_entry(fs_info, bytenr, fs_info->nodesize, ref_root); in add_tree_block()
349 spin_unlock(&fs_info->ref_verify_lock); in add_tree_block()
[all …]
Dsuper.c173 void __btrfs_handle_fs_error(struct btrfs_fs_info *fs_info, const char *function, in __btrfs_handle_fs_error() argument
176 struct super_block *sb = fs_info->sb; in __btrfs_handle_fs_error()
191 btrfs_state_to_string(fs_info, statestr); in __btrfs_handle_fs_error()
213 set_bit(BTRFS_FS_STATE_ERROR, &fs_info->fs_state); in __btrfs_handle_fs_error()
222 btrfs_discard_stop(fs_info); in __btrfs_handle_fs_error()
226 btrfs_info(fs_info, "forced readonly"); in __btrfs_handle_fs_error()
265 void __cold _btrfs_printk(const struct btrfs_fs_info *fs_info, const char *fmt, ...) in _btrfs_printk() argument
292 if (fs_info) { in _btrfs_printk()
295 btrfs_state_to_string(fs_info, statestr); in _btrfs_printk()
297 fs_info->sb->s_id, statestr, &vaf); in _btrfs_printk()
[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);
12 int btrfs_ref_tree_mod(struct btrfs_fs_info *fs_info,
14 void btrfs_free_ref_tree_range(struct btrfs_fs_info *fs_info, u64 start,
17 static inline void btrfs_init_ref_verify(struct btrfs_fs_info *fs_info) in btrfs_init_ref_verify() argument
19 spin_lock_init(&fs_info->ref_verify_lock); in btrfs_init_ref_verify()
20 fs_info->block_tree = RB_ROOT; in btrfs_init_ref_verify()
23 static inline int btrfs_build_ref_tree(struct btrfs_fs_info *fs_info) in btrfs_build_ref_tree() argument
28 static inline void btrfs_free_ref_cache(struct btrfs_fs_info *fs_info) in btrfs_free_ref_cache() argument
32 static inline int btrfs_ref_tree_mod(struct btrfs_fs_info *fs_info, in btrfs_ref_tree_mod() argument
[all …]
Dscrub.c161 struct btrfs_fs_info *fs_info; member
329 sblock->len += sblock->sctx->fs_info->sectorsize; in alloc_scrub_sector()
385 static void scrub_recheck_block(struct btrfs_fs_info *fs_info,
412 static void scrub_find_good_copy(struct btrfs_fs_info *fs_info,
443 static void __scrub_blocked_if_needed(struct btrfs_fs_info *fs_info) in __scrub_blocked_if_needed() argument
445 while (atomic_read(&fs_info->scrub_pause_req)) { in __scrub_blocked_if_needed()
446 mutex_unlock(&fs_info->scrub_lock); in __scrub_blocked_if_needed()
447 wait_event(fs_info->scrub_pause_wait, in __scrub_blocked_if_needed()
448 atomic_read(&fs_info->scrub_pause_req) == 0); in __scrub_blocked_if_needed()
449 mutex_lock(&fs_info->scrub_lock); in __scrub_blocked_if_needed()
[all …]
Dzoned.c195 const sector_t zone_sectors = device->fs_info->zone_size >> SECTOR_SHIFT; in emulate_report_zones()
264 btrfs_err_in_rcu(device->fs_info, in btrfs_get_dev_zones()
283 static int calculate_emulated_zone_size(struct btrfs_fs_info *fs_info) in calculate_emulated_zone_size() argument
286 struct btrfs_root *root = fs_info->dev_root; in calculate_emulated_zone_size()
317 fs_info->zone_size = btrfs_dev_extent_length(leaf, dext); in calculate_emulated_zone_size()
326 int btrfs_get_dev_zone_info_all_devices(struct btrfs_fs_info *fs_info) in btrfs_get_dev_zone_info_all_devices() argument
328 struct btrfs_fs_devices *fs_devices = fs_info->fs_devices; in btrfs_get_dev_zone_info_all_devices()
333 if (!btrfs_fs_incompat(fs_info, ZONED)) in btrfs_get_dev_zone_info_all_devices()
353 struct btrfs_fs_info *fs_info = device->fs_info; in btrfs_get_dev_zone_info() local
370 if (!btrfs_fs_incompat(fs_info, ZONED)) in btrfs_get_dev_zone_info()
[all …]
Dfile-item.c46 struct btrfs_fs_info *fs_info = inode->root->fs_info; in btrfs_inode_safe_disk_i_size_write() local
51 if (btrfs_fs_incompat(fs_info, NO_HOLES)) { in btrfs_inode_safe_disk_i_size_write()
87 ASSERT(IS_ALIGNED(start + len, inode->root->fs_info->sectorsize)); in btrfs_inode_set_file_extent_range()
89 if (btrfs_fs_incompat(inode->root->fs_info, NO_HOLES)) in btrfs_inode_set_file_extent_range()
115 ASSERT(IS_ALIGNED(start + len, inode->root->fs_info->sectorsize) || in btrfs_inode_clear_file_extent_range()
118 if (btrfs_fs_incompat(inode->root->fs_info, NO_HOLES)) in btrfs_inode_clear_file_extent_range()
124 static inline u32 max_ordered_sum_bytes(struct btrfs_fs_info *fs_info, in max_ordered_sum_bytes() argument
129 return ncsums * fs_info->sectorsize; in max_ordered_sum_bytes()
136 static int btrfs_ordered_sum_size(struct btrfs_fs_info *fs_info, unsigned long bytes) in btrfs_ordered_sum_size() argument
138 int num_sectors = (int)DIV_ROUND_UP(bytes, fs_info->sectorsize); in btrfs_ordered_sum_size()
[all …]
Dctree.h1084 static inline void btrfs_set_last_root_drop_gen(struct btrfs_fs_info *fs_info, in btrfs_set_last_root_drop_gen() argument
1087 WRITE_ONCE(fs_info->last_root_drop_gen, gen); in btrfs_set_last_root_drop_gen()
1090 static inline u64 btrfs_get_last_root_drop_gen(const struct btrfs_fs_info *fs_info) in btrfs_get_last_root_drop_gen() argument
1092 return READ_ONCE(fs_info->last_root_drop_gen); in btrfs_get_last_root_drop_gen()
1105 const struct btrfs_fs_info *fs_info, u64 csum_bytes) in btrfs_csum_bytes_to_leaves() argument
1107 const u64 num_csums = csum_bytes >> fs_info->sectorsize_bits; in btrfs_csum_bytes_to_leaves()
1109 return DIV_ROUND_UP_ULL(num_csums, fs_info->csums_per_leaf); in btrfs_csum_bytes_to_leaves()
1116 static inline u64 btrfs_calc_insert_metadata_size(struct btrfs_fs_info *fs_info, in btrfs_calc_insert_metadata_size() argument
1119 return (u64)fs_info->nodesize * BTRFS_MAX_LEVEL * 2 * num_items; in btrfs_calc_insert_metadata_size()
1126 static inline u64 btrfs_calc_metadata_size(struct btrfs_fs_info *fs_info, in btrfs_calc_metadata_size() argument
[all …]
Dextent_io.c39 struct btrfs_fs_info *fs_info = eb->fs_info; in btrfs_leak_debug_add_eb() local
42 spin_lock_irqsave(&fs_info->eb_leak_lock, flags); in btrfs_leak_debug_add_eb()
43 list_add(&eb->leak_list, &fs_info->allocated_ebs); in btrfs_leak_debug_add_eb()
44 spin_unlock_irqrestore(&fs_info->eb_leak_lock, flags); in btrfs_leak_debug_add_eb()
49 struct btrfs_fs_info *fs_info = eb->fs_info; in btrfs_leak_debug_del_eb() local
52 spin_lock_irqsave(&fs_info->eb_leak_lock, flags); in btrfs_leak_debug_del_eb()
54 spin_unlock_irqrestore(&fs_info->eb_leak_lock, flags); in btrfs_leak_debug_del_eb()
57 void btrfs_extent_buffer_leak_debug_check(struct btrfs_fs_info *fs_info) in btrfs_extent_buffer_leak_debug_check() argument
66 if (!fs_info->allocated_ebs.next) in btrfs_extent_buffer_leak_debug_check()
69 WARN_ON(!list_empty(&fs_info->allocated_ebs)); in btrfs_extent_buffer_leak_debug_check()
[all …]
/linux-6.1.9/fs/btrfs/tests/
Dbtrfs-tests.c96 struct btrfs_device *btrfs_alloc_dummy_device(struct btrfs_fs_info *fs_info) in btrfs_alloc_dummy_device() argument
106 list_add(&dev->dev_list, &fs_info->fs_devices->devices); in btrfs_alloc_dummy_device()
119 struct btrfs_fs_info *fs_info = kzalloc(sizeof(struct btrfs_fs_info), in btrfs_alloc_dummy_fs_info() local
122 if (!fs_info) in btrfs_alloc_dummy_fs_info()
123 return fs_info; in btrfs_alloc_dummy_fs_info()
124 fs_info->fs_devices = kzalloc(sizeof(struct btrfs_fs_devices), in btrfs_alloc_dummy_fs_info()
126 if (!fs_info->fs_devices) { in btrfs_alloc_dummy_fs_info()
127 kfree(fs_info); in btrfs_alloc_dummy_fs_info()
130 INIT_LIST_HEAD(&fs_info->fs_devices->devices); in btrfs_alloc_dummy_fs_info()
132 fs_info->super_copy = kzalloc(sizeof(struct btrfs_super_block), in btrfs_alloc_dummy_fs_info()
[all …]
Dqgroup-tests.c207 struct btrfs_fs_info *fs_info = root->fs_info; in test_no_shared_qgroup() local
212 btrfs_init_dummy_trans(&trans, fs_info); in test_no_shared_qgroup()
226 ret = btrfs_find_all_roots(&trans, fs_info, nodesize, 0, &old_roots, false); in test_no_shared_qgroup()
239 ret = btrfs_find_all_roots(&trans, fs_info, nodesize, 0, &new_roots, false); in test_no_shared_qgroup()
257 if (btrfs_verify_qgroup_counts(fs_info, BTRFS_FS_TREE_OBJECTID, in test_no_shared_qgroup()
263 ret = btrfs_find_all_roots(&trans, fs_info, nodesize, 0, &old_roots, false); in test_no_shared_qgroup()
275 ret = btrfs_find_all_roots(&trans, fs_info, nodesize, 0, &new_roots, false); in test_no_shared_qgroup()
289 if (btrfs_verify_qgroup_counts(fs_info, BTRFS_FS_TREE_OBJECTID, 0, 0)) { in test_no_shared_qgroup()
306 struct btrfs_fs_info *fs_info = root->fs_info; in test_multiple_refs() local
311 btrfs_init_dummy_trans(&trans, fs_info); in test_multiple_refs()
[all …]

12345