/linux-6.12.1/fs/btrfs/ |
D | messages.h | 18 void btrfs_no_printk(const struct btrfs_fs_info *fs_info, const char *fmt, ...) in btrfs_no_printk() argument 26 #define btrfs_printk(fs_info, fmt, args...) \ argument 27 _btrfs_printk(fs_info, fmt, ##args) 31 void _btrfs_printk(const struct btrfs_fs_info *fs_info, const char *fmt, ...); 35 #define btrfs_printk(fs_info, fmt, args...) \ argument 36 btrfs_no_printk(fs_info, fmt, ##args) 39 #define btrfs_emerg(fs_info, fmt, args...) \ argument 40 btrfs_printk(fs_info, KERN_EMERG fmt, ##args) 41 #define btrfs_alert(fs_info, fmt, args...) \ argument 42 btrfs_printk(fs_info, KERN_ALERT fmt, ##args) [all …]
|
D | disk-io.c | 61 static int btrfs_cleanup_transaction(struct btrfs_fs_info *fs_info); 62 static void btrfs_error_commit_super(struct btrfs_fs_info *fs_info); 64 static void btrfs_free_csum_hash(struct btrfs_fs_info *fs_info) in btrfs_free_csum_hash() argument 66 if (fs_info->csum_shash) in btrfs_free_csum_hash() 67 crypto_free_shash(fs_info->csum_shash); in btrfs_free_csum_hash() 75 struct btrfs_fs_info *fs_info = buf->fs_info; in csum_tree_block() local 78 SHASH_DESC_ON_STACK(shash, fs_info->csum_shash); in csum_tree_block() 82 shash->tfm = fs_info->csum_shash; in csum_tree_block() 88 first_page_part = fs_info->nodesize; in csum_tree_block() 92 first_page_part = min_t(u32, PAGE_SIZE, fs_info->nodesize); in csum_tree_block() [all …]
|
D | transaction.c | 148 btrfs_err(transaction->fs_info, in btrfs_put_transaction() 176 struct btrfs_fs_info *fs_info = trans->fs_info; in switch_commit_roots() local 185 down_write(&fs_info->commit_root_sem); in switch_commit_roots() 187 if (test_bit(BTRFS_FS_RELOC_RUNNING, &fs_info->flags)) in switch_commit_roots() 188 fs_info->last_reloc_trans = trans->transid; in switch_commit_roots() 207 btrfs_drop_and_free_fs_root(fs_info, root); in switch_commit_roots() 212 up_write(&fs_info->commit_root_sem); in switch_commit_roots() 249 struct btrfs_fs_info *fs_info = trans->fs_info; in btrfs_trans_release_chunk_metadata() local 254 btrfs_block_rsv_release(fs_info, &fs_info->chunk_block_rsv, in btrfs_trans_release_chunk_metadata() 262 static noinline int join_transaction(struct btrfs_fs_info *fs_info, in join_transaction() argument [all …]
|
D | qgroup.c | 33 enum btrfs_qgroup_mode btrfs_qgroup_mode(const struct btrfs_fs_info *fs_info) in btrfs_qgroup_mode() argument 35 if (!test_bit(BTRFS_FS_QUOTA_ENABLED, &fs_info->flags)) in btrfs_qgroup_mode() 37 if (fs_info->qgroup_flags & BTRFS_QGROUP_STATUS_FLAG_SIMPLE_MODE) in btrfs_qgroup_mode() 42 bool btrfs_qgroup_enabled(const struct btrfs_fs_info *fs_info) in btrfs_qgroup_enabled() argument 44 return btrfs_qgroup_mode(fs_info) != BTRFS_QGROUP_MODE_DISABLED; in btrfs_qgroup_enabled() 47 bool btrfs_qgroup_full_accounting(const struct btrfs_fs_info *fs_info) in btrfs_qgroup_full_accounting() argument 49 return btrfs_qgroup_mode(fs_info) == BTRFS_QGROUP_MODE_FULL; in btrfs_qgroup_full_accounting() 82 static void qgroup_rsv_add(struct btrfs_fs_info *fs_info, in qgroup_rsv_add() argument 86 trace_qgroup_update_reserve(fs_info, qgroup, num_bytes, type); in qgroup_rsv_add() 90 static void qgroup_rsv_release(struct btrfs_fs_info *fs_info, in qgroup_rsv_release() argument [all …]
|
D | subpage.c | 68 bool btrfs_is_subpage(const struct btrfs_fs_info *fs_info, struct address_space *mapping) in btrfs_is_subpage() argument 70 if (fs_info->sectorsize >= PAGE_SIZE) in btrfs_is_subpage() 85 if (fs_info->nodesize < PAGE_SIZE) in btrfs_is_subpage() 91 int btrfs_attach_subpage(const struct btrfs_fs_info *fs_info, in btrfs_attach_subpage() argument 104 if (!btrfs_is_subpage(fs_info, folio->mapping) || folio_test_private(folio)) in btrfs_attach_subpage() 107 subpage = btrfs_alloc_subpage(fs_info, type); in btrfs_attach_subpage() 115 void btrfs_detach_subpage(const struct btrfs_fs_info *fs_info, struct folio *folio) in btrfs_detach_subpage() argument 120 if (!btrfs_is_subpage(fs_info, folio->mapping) || !folio_test_private(folio)) in btrfs_detach_subpage() 128 struct btrfs_subpage *btrfs_alloc_subpage(const struct btrfs_fs_info *fs_info, in btrfs_alloc_subpage() argument 134 ASSERT(fs_info->sectorsize < PAGE_SIZE); in btrfs_alloc_subpage() [all …]
|
D | delalloc-space.c | 117 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 …]
|
D | block-rsv.c | 104 static u64 block_rsv_release_bytes(struct btrfs_fs_info *fs_info, in block_rsv_release_bytes() argument 153 btrfs_space_info_free_bytes_may_use(fs_info, in block_rsv_release_bytes() 183 void btrfs_init_metadata_block_rsv(struct btrfs_fs_info *fs_info, in btrfs_init_metadata_block_rsv() argument 188 rsv->space_info = btrfs_find_space_info(fs_info, in btrfs_init_metadata_block_rsv() 192 struct btrfs_block_rsv *btrfs_alloc_block_rsv(struct btrfs_fs_info *fs_info, in btrfs_alloc_block_rsv() argument 201 btrfs_init_metadata_block_rsv(fs_info, block_rsv, type); in btrfs_alloc_block_rsv() 205 void btrfs_free_block_rsv(struct btrfs_fs_info *fs_info, in btrfs_free_block_rsv() argument 210 btrfs_block_rsv_release(fs_info, rsv, (u64)-1, NULL); in btrfs_free_block_rsv() 214 int btrfs_block_rsv_add(struct btrfs_fs_info *fs_info, in btrfs_block_rsv_add() argument 223 ret = btrfs_reserve_metadata_bytes(fs_info, block_rsv->space_info, in btrfs_block_rsv_add() [all …]
|
D | space-info.c | 200 static u64 calc_chunk_size(const struct btrfs_fs_info *fs_info, u64 flags) in calc_chunk_size() argument 202 if (btrfs_is_zoned(fs_info)) in calc_chunk_size() 203 return fs_info->zone_size; in calc_chunk_size() 213 if (fs_info->fs_devices->total_rw_bytes > 50ULL * SZ_1G) in calc_chunk_size() 239 space_info->fs_info = info; in create_space_info() 266 int btrfs_init_space_info(struct btrfs_fs_info *fs_info) in btrfs_init_space_info() argument 274 disk_super = fs_info->super_copy; in btrfs_init_space_info() 283 ret = create_space_info(fs_info, flags); in btrfs_init_space_info() 289 ret = create_space_info(fs_info, flags); in btrfs_init_space_info() 292 ret = create_space_info(fs_info, flags); in btrfs_init_space_info() [all …]
|
D | dev-replace.c | 66 static int btrfs_dev_replace_finishing(struct btrfs_fs_info *fs_info, 70 int btrfs_init_dev_replace(struct btrfs_fs_info *fs_info) in btrfs_init_dev_replace() argument 74 struct btrfs_root *dev_root = fs_info->dev_root; in btrfs_init_dev_replace() 75 struct btrfs_dev_replace *dev_replace = &fs_info->dev_replace; in btrfs_init_dev_replace() 103 if (btrfs_find_device(fs_info->fs_devices, &args)) { in btrfs_init_dev_replace() 104 btrfs_err(fs_info, in btrfs_init_dev_replace() 134 btrfs_warn(fs_info, in btrfs_init_dev_replace() 165 if (btrfs_find_device(fs_info->fs_devices, &args)) { in btrfs_init_dev_replace() 166 btrfs_err(fs_info, in btrfs_init_dev_replace() 176 dev_replace->tgtdev = btrfs_find_device(fs_info->fs_devices, &args); in btrfs_init_dev_replace() [all …]
|
D | fs.c | 8 void __btrfs_set_fs_incompat(struct btrfs_fs_info *fs_info, u64 flag, in __btrfs_set_fs_incompat() argument 14 disk_super = fs_info->super_copy; in __btrfs_set_fs_incompat() 17 spin_lock(&fs_info->super_lock); in __btrfs_set_fs_incompat() 22 btrfs_info(fs_info, in __btrfs_set_fs_incompat() 26 spin_unlock(&fs_info->super_lock); in __btrfs_set_fs_incompat() 27 set_bit(BTRFS_FS_FEATURE_CHANGED, &fs_info->flags); in __btrfs_set_fs_incompat() 31 void __btrfs_clear_fs_incompat(struct btrfs_fs_info *fs_info, u64 flag, in __btrfs_clear_fs_incompat() argument 37 disk_super = fs_info->super_copy; in __btrfs_clear_fs_incompat() 40 spin_lock(&fs_info->super_lock); in __btrfs_clear_fs_incompat() 45 btrfs_info(fs_info, in __btrfs_clear_fs_incompat() [all …]
|
D | scrub.c | 188 struct btrfs_fs_info *fs_info; member 249 static int init_scrub_stripe(struct btrfs_fs_info *fs_info, in init_scrub_stripe() argument 256 stripe->nr_sectors = BTRFS_STRIPE_LEN >> fs_info->sectorsize_bits; in init_scrub_stripe() 274 stripe->csums = kcalloc(BTRFS_STRIPE_LEN >> fs_info->sectorsize_bits, in init_scrub_stripe() 275 fs_info->csum_size, GFP_KERNEL); in init_scrub_stripe() 291 static void __scrub_blocked_if_needed(struct btrfs_fs_info *fs_info) in __scrub_blocked_if_needed() argument 293 while (atomic_read(&fs_info->scrub_pause_req)) { in __scrub_blocked_if_needed() 294 mutex_unlock(&fs_info->scrub_lock); in __scrub_blocked_if_needed() 295 wait_event(fs_info->scrub_pause_wait, in __scrub_blocked_if_needed() 296 atomic_read(&fs_info->scrub_pause_req) == 0); in __scrub_blocked_if_needed() [all …]
|
D | super.c | 72 struct btrfs_fs_info *fs_info = btrfs_sb(sb); in btrfs_put_super() local 74 btrfs_info(fs_info, "last unmount of filesystem %pU", fs_info->fs_devices->fsid); in btrfs_put_super() 75 close_ctree(fs_info); in btrfs_put_super() 647 static void btrfs_clear_oneshot_options(struct btrfs_fs_info *fs_info) in btrfs_clear_oneshot_options() argument 649 btrfs_clear_opt(fs_info->mount_opt, USEBACKUPROOT); in btrfs_clear_oneshot_options() 650 btrfs_clear_opt(fs_info->mount_opt, CLEAR_CACHE); in btrfs_clear_oneshot_options() 651 btrfs_clear_opt(fs_info->mount_opt, NOSPACECACHE); in btrfs_clear_oneshot_options() 654 static bool check_ro_option(const struct btrfs_fs_info *fs_info, in check_ro_option() argument 659 btrfs_err(fs_info, "%s must be used with ro mount option", in check_ro_option() 720 void btrfs_set_free_space_cache_settings(struct btrfs_fs_info *fs_info) in btrfs_set_free_space_cache_settings() argument [all …]
|
D | block-group.c | 28 struct btrfs_fs_info *fs_info = block_group->fs_info; in btrfs_should_fragment_free_space() local 30 return (btrfs_test_opt(fs_info, FRAGMENT_METADATA) && in btrfs_should_fragment_free_space() 32 (btrfs_test_opt(fs_info, FRAGMENT_DATA) && in btrfs_should_fragment_free_space() 43 static u64 get_restripe_target(const struct btrfs_fs_info *fs_info, u64 flags) in get_restripe_target() argument 45 const struct btrfs_balance_control *bctl = fs_info->balance_ctl; in get_restripe_target() 72 static u64 btrfs_reduce_alloc_profile(struct btrfs_fs_info *fs_info, u64 flags) in btrfs_reduce_alloc_profile() argument 74 u64 num_devices = fs_info->fs_devices->rw_devices; in btrfs_reduce_alloc_profile() 83 spin_lock(&fs_info->balance_lock); in btrfs_reduce_alloc_profile() 84 target = get_restripe_target(fs_info, flags); in btrfs_reduce_alloc_profile() 86 spin_unlock(&fs_info->balance_lock); in btrfs_reduce_alloc_profile() [all …]
|
D | disk-io.h | 44 void btrfs_check_leaked_roots(const struct btrfs_fs_info *fs_info); 45 void btrfs_init_fs_info(struct btrfs_fs_info *fs_info); 46 struct extent_buffer *read_tree_block(struct btrfs_fs_info *fs_info, u64 bytenr, 49 struct btrfs_fs_info *fs_info, 52 int btrfs_start_pre_rw_mount(struct btrfs_fs_info *fs_info); 53 int btrfs_check_super_csum(struct btrfs_fs_info *fs_info, 57 void __cold close_ctree(struct btrfs_fs_info *fs_info); 58 int btrfs_validate_super(const struct btrfs_fs_info *fs_info, 60 int btrfs_check_features(struct btrfs_fs_info *fs_info, bool is_rw_mount); 61 int write_all_supers(struct btrfs_fs_info *fs_info, int max_mirrors); [all …]
|
D | zoned.h | 56 int btrfs_get_dev_zone_info_all_devices(struct btrfs_fs_info *fs_info); 60 int btrfs_check_zoned_mode(struct btrfs_fs_info *fs_info); 78 int btrfs_check_meta_write_pointer(struct btrfs_fs_info *fs_info, 86 void btrfs_zone_finish_endio(struct btrfs_fs_info *fs_info, u64 logical, 91 void btrfs_free_zone_cache(struct btrfs_fs_info *fs_info); 92 bool btrfs_zoned_should_reclaim(const struct btrfs_fs_info *fs_info); 93 void btrfs_zoned_release_data_reloc_bg(struct btrfs_fs_info *fs_info, u64 logical, 95 int btrfs_zone_finish_one_bg(struct btrfs_fs_info *fs_info); 96 int btrfs_zoned_activate_one_bg(struct btrfs_fs_info *fs_info, 98 void btrfs_check_active_zone_reservation(struct btrfs_fs_info *fs_info); [all …]
|
D | subpage.h | 77 bool btrfs_is_subpage(const struct btrfs_fs_info *fs_info, struct address_space *mapping); 79 static inline bool btrfs_is_subpage(const struct btrfs_fs_info *fs_info, in btrfs_is_subpage() argument 86 int btrfs_attach_subpage(const struct btrfs_fs_info *fs_info, 88 void btrfs_detach_subpage(const struct btrfs_fs_info *fs_info, struct folio *folio); 91 struct btrfs_subpage *btrfs_alloc_subpage(const struct btrfs_fs_info *fs_info, 95 void btrfs_folio_inc_eb_refs(const struct btrfs_fs_info *fs_info, struct folio *folio); 96 void btrfs_folio_dec_eb_refs(const struct btrfs_fs_info *fs_info, struct folio *folio); 98 void btrfs_subpage_start_reader(const struct btrfs_fs_info *fs_info, 100 void btrfs_subpage_end_reader(const struct btrfs_fs_info *fs_info, 103 int btrfs_folio_start_writer_lock(const struct btrfs_fs_info *fs_info, [all …]
|
D | tree-mod-log.c | 47 static u64 btrfs_inc_tree_mod_seq(struct btrfs_fs_info *fs_info) in btrfs_inc_tree_mod_seq() argument 49 return atomic64_inc_return(&fs_info->tree_mod_seq); in btrfs_inc_tree_mod_seq() 60 u64 btrfs_get_tree_mod_seq(struct btrfs_fs_info *fs_info, in btrfs_get_tree_mod_seq() argument 63 write_lock(&fs_info->tree_mod_log_lock); in btrfs_get_tree_mod_seq() 65 elem->seq = btrfs_inc_tree_mod_seq(fs_info); in btrfs_get_tree_mod_seq() 66 list_add_tail(&elem->list, &fs_info->tree_mod_seq_list); in btrfs_get_tree_mod_seq() 67 set_bit(BTRFS_FS_TREE_MOD_LOG_USERS, &fs_info->flags); in btrfs_get_tree_mod_seq() 69 write_unlock(&fs_info->tree_mod_log_lock); in btrfs_get_tree_mod_seq() 74 void btrfs_put_tree_mod_seq(struct btrfs_fs_info *fs_info, in btrfs_put_tree_mod_seq() argument 87 write_lock(&fs_info->tree_mod_log_lock); in btrfs_put_tree_mod_seq() [all …]
|
D | volumes.c | 259 static int btrfs_relocate_sys_chunks(struct btrfs_fs_info *fs_info); 1113 device->fs_info = NULL; in btrfs_close_one_device() 1153 fs_devices->fs_info = NULL; in close_fs_devices() 1458 lockdep_assert_held(&device->fs_info->chunk_mutex); in contains_pending_extent() 1620 struct btrfs_fs_info *fs_info = device->fs_info; in find_free_dev_extent() local 1621 struct btrfs_root *root = fs_info->dev_root; in find_free_dev_extent() 1764 struct btrfs_fs_info *fs_info = device->fs_info; in btrfs_free_dev_extent() local 1765 struct btrfs_root *root = fs_info->dev_root; in btrfs_free_dev_extent() 1814 static u64 find_next_chunk(struct btrfs_fs_info *fs_info) in find_next_chunk() argument 1819 read_lock(&fs_info->mapping_tree_lock); in find_next_chunk() [all …]
|
D | fs.h | 884 #define page_to_fs_info(_page) (page_to_inode(_page)->root->fs_info) 885 #define folio_to_fs_info(_folio) (folio_to_inode(_folio)->root->fs_info) 888 struct inode *: (_inode)))->root->fs_info) 890 static inline u64 btrfs_get_fs_generation(const struct btrfs_fs_info *fs_info) in btrfs_get_fs_generation() argument 892 return READ_ONCE(fs_info->generation); in btrfs_get_fs_generation() 895 static inline void btrfs_set_fs_generation(struct btrfs_fs_info *fs_info, u64 gen) in btrfs_set_fs_generation() argument 897 WRITE_ONCE(fs_info->generation, gen); in btrfs_set_fs_generation() 900 static inline u64 btrfs_get_last_trans_committed(const struct btrfs_fs_info *fs_info) in btrfs_get_last_trans_committed() argument 902 return READ_ONCE(fs_info->last_trans_committed); in btrfs_get_last_trans_committed() 905 static inline void btrfs_set_last_trans_committed(struct btrfs_fs_info *fs_info, u64 gen) in btrfs_set_last_trans_committed() argument [all …]
|
D | sysfs.c | 121 static u64 get_features(struct btrfs_fs_info *fs_info, in get_features() argument 124 struct btrfs_super_block *disk_super = fs_info->super_copy; in get_features() 133 static void set_features(struct btrfs_fs_info *fs_info, in set_features() argument 136 struct btrfs_super_block *disk_super = fs_info->super_copy; in set_features() 180 struct btrfs_fs_info *fs_info = to_fs_info(kobj); in btrfs_feature_attr_show() local 182 if (fs_info) { in btrfs_feature_attr_show() 183 u64 features = get_features(fs_info, fa->feature_set); in btrfs_feature_attr_show() 196 struct btrfs_fs_info *fs_info; in btrfs_feature_attr_store() local 202 fs_info = to_fs_info(kobj); in btrfs_feature_attr_store() 203 if (!fs_info) in btrfs_feature_attr_store() [all …]
|
D | ref-verify.c | 214 static void __print_stack_trace(struct btrfs_fs_info *fs_info, in __print_stack_trace() argument 218 btrfs_err(fs_info, " ref-verify: no stacktrace"); in __print_stack_trace() 228 static inline void __print_stack_trace(struct btrfs_fs_info *fs_info, in __print_stack_trace() argument 231 btrfs_err(fs_info, " ref-verify: no stacktrace support"); in __print_stack_trace() 263 static struct block_entry *add_block_entry(struct btrfs_fs_info *fs_info, in add_block_entry() argument 283 spin_lock(&fs_info->ref_verify_lock); in add_block_entry() 284 exist = insert_block_entry(&fs_info->block_tree, be); in add_block_entry() 312 static int add_tree_block(struct btrfs_fs_info *fs_info, u64 ref_root, in add_tree_block() argument 332 be = add_block_entry(fs_info, bytenr, fs_info->nodesize, ref_root); in add_tree_block() 352 spin_unlock(&fs_info->ref_verify_lock); in add_tree_block() [all …]
|
D | zoned.c | 197 const sector_t zone_sectors = device->fs_info->zone_size >> SECTOR_SHIFT; in emulate_report_zones() 266 btrfs_err_in_rcu(device->fs_info, in btrfs_get_dev_zones() 288 static int calculate_emulated_zone_size(struct btrfs_fs_info *fs_info) in calculate_emulated_zone_size() argument 291 struct btrfs_root *root = fs_info->dev_root; in calculate_emulated_zone_size() 320 fs_info->zone_size = btrfs_dev_extent_length(leaf, dext); in calculate_emulated_zone_size() 324 int btrfs_get_dev_zone_info_all_devices(struct btrfs_fs_info *fs_info) in btrfs_get_dev_zone_info_all_devices() argument 326 struct btrfs_fs_devices *fs_devices = fs_info->fs_devices; in btrfs_get_dev_zone_info_all_devices() 331 if (!btrfs_fs_incompat(fs_info, ZONED)) in btrfs_get_dev_zone_info_all_devices() 351 struct btrfs_fs_info *fs_info = device->fs_info; in btrfs_get_dev_zone_info() local 368 if (!btrfs_fs_incompat(fs_info, ZONED)) in btrfs_get_dev_zone_info() [all …]
|
D | messages.c | 116 void __btrfs_handle_fs_error(struct btrfs_fs_info *fs_info, const char *function, in __btrfs_handle_fs_error() argument 119 struct super_block *sb = fs_info->sb; in __btrfs_handle_fs_error() 139 btrfs_state_to_string(fs_info, statestr); in __btrfs_handle_fs_error() 161 WRITE_ONCE(fs_info->fs_error, error); in __btrfs_handle_fs_error() 170 btrfs_discard_stop(fs_info); in __btrfs_handle_fs_error() 174 btrfs_info(fs_info, "forced readonly"); in __btrfs_handle_fs_error() 212 void __cold _btrfs_printk(const struct btrfs_fs_info *fs_info, const char *fmt, ...) in _btrfs_printk() argument 244 if (fs_info) { in _btrfs_printk() 247 btrfs_state_to_string(fs_info, statestr); in _btrfs_printk() 249 fs_info->sb->s_id, statestr, &vaf); in _btrfs_printk() [all …]
|
D | ref-verify.h | 19 int btrfs_build_ref_tree(struct btrfs_fs_info *fs_info); 20 void btrfs_free_ref_cache(struct btrfs_fs_info *fs_info); 21 int btrfs_ref_tree_mod(struct btrfs_fs_info *fs_info, 23 void btrfs_free_ref_tree_range(struct btrfs_fs_info *fs_info, u64 start, 26 static inline void btrfs_init_ref_verify(struct btrfs_fs_info *fs_info) in btrfs_init_ref_verify() argument 28 spin_lock_init(&fs_info->ref_verify_lock); in btrfs_init_ref_verify() 29 fs_info->block_tree = RB_ROOT; in btrfs_init_ref_verify() 32 static inline int btrfs_build_ref_tree(struct btrfs_fs_info *fs_info) in btrfs_build_ref_tree() argument 37 static inline void btrfs_free_ref_cache(struct btrfs_fs_info *fs_info) in btrfs_free_ref_cache() argument 41 static inline int btrfs_ref_tree_mod(struct btrfs_fs_info *fs_info, in btrfs_ref_tree_mod() argument [all …]
|
/linux-6.12.1/fs/btrfs/tests/ |
D | btrfs-tests.c | 95 struct btrfs_device *btrfs_alloc_dummy_device(struct btrfs_fs_info *fs_info) in btrfs_alloc_dummy_device() argument 103 extent_io_tree_init(fs_info, &dev->alloc_state, 0); in btrfs_alloc_dummy_device() 105 list_add(&dev->dev_list, &fs_info->fs_devices->devices); in btrfs_alloc_dummy_device() 118 struct btrfs_fs_info *fs_info = kzalloc(sizeof(struct btrfs_fs_info), in btrfs_alloc_dummy_fs_info() local 121 if (!fs_info) in btrfs_alloc_dummy_fs_info() 122 return fs_info; in btrfs_alloc_dummy_fs_info() 123 fs_info->fs_devices = kzalloc(sizeof(struct btrfs_fs_devices), in btrfs_alloc_dummy_fs_info() 125 if (!fs_info->fs_devices) { in btrfs_alloc_dummy_fs_info() 126 kfree(fs_info); in btrfs_alloc_dummy_fs_info() 129 INIT_LIST_HEAD(&fs_info->fs_devices->devices); in btrfs_alloc_dummy_fs_info() [all …]
|