Home
last modified time | relevance | path

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

12345

/linux/fs/btrfs/
H A Ddisk-io.c61 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 in csum_tree_block()
159 btrfs_check_super_csum(struct btrfs_fs_info * fs_info,const struct btrfs_super_block * disk_sb) btrfs_check_super_csum() argument
184 struct btrfs_fs_info *fs_info = eb->fs_info; btrfs_repair_eb_io_failure() local
218 struct btrfs_fs_info *fs_info = eb->fs_info; btrfs_read_extent_buffer() local
262 struct btrfs_fs_info *fs_info = eb->fs_info; btree_csum_one_bio() local
334 struct btrfs_fs_info *fs_info = eb->fs_info; check_tree_block_fsid() local
361 struct btrfs_fs_info *fs_info = eb->fs_info; btrfs_validate_extent_buffer() local
499 struct btrfs_fs_info *fs_info; btree_writepages() local
543 struct btrfs_fs_info *fs_info = inode_to_fs_info(mapping->host); btree_dirty_folio() local
600 btrfs_find_create_tree_block(struct btrfs_fs_info * fs_info,u64 bytenr,u64 owner_root,int level) btrfs_find_create_tree_block() argument
616 read_tree_block(struct btrfs_fs_info * fs_info,u64 bytenr,struct btrfs_tree_parent_check * check) read_tree_block() argument
638 btrfs_alloc_root(struct btrfs_fs_info * fs_info,u64 objectid,gfp_t flags) btrfs_alloc_root() argument
720 btrfs_alloc_dummy_root(struct btrfs_fs_info * fs_info) btrfs_alloc_dummy_root() argument
756 struct btrfs_fs_info *fs_info = root->fs_info; btrfs_global_root_insert() local
774 struct btrfs_fs_info *fs_info = root->fs_info; btrfs_global_root_delete() local
781 btrfs_global_root(struct btrfs_fs_info * fs_info,struct btrfs_key * key) btrfs_global_root() argument
796 btrfs_global_root_id(struct btrfs_fs_info * fs_info,u64 bytenr) btrfs_global_root_id() argument
817 btrfs_csum_root(struct btrfs_fs_info * fs_info,u64 bytenr) btrfs_csum_root() argument
828 btrfs_extent_root(struct btrfs_fs_info * fs_info,u64 bytenr) btrfs_extent_root() argument
842 struct btrfs_fs_info *fs_info = trans->fs_info; btrfs_create_tree() local
910 alloc_log_tree(struct btrfs_fs_info * fs_info) alloc_log_tree() argument
954 btrfs_init_log_root_tree(struct btrfs_trans_handle * trans,struct btrfs_fs_info * fs_info) btrfs_init_log_root_tree() argument
979 struct btrfs_fs_info *fs_info = root->fs_info; btrfs_add_log_tree() local
1021 struct btrfs_fs_info *fs_info = tree_root->fs_info; read_tree_root_path() local
1141 btrfs_lookup_fs_root(struct btrfs_fs_info * fs_info,u64 root_id) btrfs_lookup_fs_root() argument
1154 btrfs_get_global_root(struct btrfs_fs_info * fs_info,u64 objectid) btrfs_get_global_root() argument
1189 btrfs_insert_fs_root(struct btrfs_fs_info * fs_info,struct btrfs_root * root) btrfs_insert_fs_root() argument
1212 btrfs_check_leaked_roots(const struct btrfs_fs_info * fs_info) btrfs_check_leaked_roots() argument
1233 free_global_roots(struct btrfs_fs_info * fs_info) free_global_roots() argument
1245 btrfs_free_fs_info(struct btrfs_fs_info * fs_info) btrfs_free_fs_info() argument
1300 btrfs_get_root_ref(struct btrfs_fs_info * fs_info,u64 objectid,dev_t * anon_dev,bool check_ref) btrfs_get_root_ref() argument
1404 btrfs_get_fs_root(struct btrfs_fs_info * fs_info,u64 objectid,bool check_ref) btrfs_get_fs_root() argument
1418 btrfs_get_new_fs_root(struct btrfs_fs_info * fs_info,u64 objectid,dev_t * anon_dev) btrfs_get_new_fs_root() argument
1439 btrfs_get_fs_root_commit_root(struct btrfs_fs_info * fs_info,struct btrfs_path * path,u64 objectid) btrfs_get_fs_root_commit_root() argument
1473 struct btrfs_fs_info *fs_info = arg; cleaner_kthread() local
1551 struct btrfs_fs_info *fs_info = root->fs_info; transaction_kthread() local
1731 read_backup_root(struct btrfs_fs_info * fs_info,u8 priority) read_backup_root() argument
1767 btrfs_stop_all_workers(struct btrfs_fs_info * fs_info) btrfs_stop_all_workers() argument
1805 free_global_root_pointers(struct btrfs_fs_info * fs_info) free_global_root_pointers() argument
1855 btrfs_free_fs_roots(struct btrfs_fs_info * fs_info) btrfs_free_fs_roots() argument
1882 btrfs_init_scrub(struct btrfs_fs_info * fs_info) btrfs_init_scrub() argument
1893 btrfs_init_balance(struct btrfs_fs_info * fs_info) btrfs_init_balance() argument
1906 struct btrfs_fs_info *fs_info = btrfs_sb(sb); btrfs_init_btree_inode() local
1938 btrfs_init_dev_replace_locks(struct btrfs_fs_info * fs_info) btrfs_init_dev_replace_locks() argument
1945 btrfs_init_qgroup(struct btrfs_fs_info * fs_info) btrfs_init_qgroup() argument
1957 btrfs_init_workqueues(struct btrfs_fs_info * fs_info) btrfs_init_workqueues() argument
2017 btrfs_init_csum_hash(struct btrfs_fs_info * fs_info,u16 csum_type) btrfs_init_csum_hash() argument
2051 btrfs_replay_log(struct btrfs_fs_info * fs_info,struct btrfs_fs_devices * fs_devices) btrfs_replay_log() argument
2110 struct btrfs_fs_info *fs_info = tree_root->fs_info; load_global_roots_objectid() local
2213 btrfs_read_roots(struct btrfs_fs_info * fs_info) btrfs_read_roots() argument
2316 validate_sys_chunk_array(const struct btrfs_fs_info * fs_info,const struct btrfs_super_block * sb) validate_sys_chunk_array() argument
2391 btrfs_validate_super(const struct btrfs_fs_info * fs_info,const struct btrfs_super_block * sb,int mirror_num) btrfs_validate_super() argument
2603 btrfs_validate_mount_super(struct btrfs_fs_info * fs_info) btrfs_validate_mount_super() argument
2614 btrfs_validate_write_super(struct btrfs_fs_info * fs_info,struct btrfs_super_block * sb) btrfs_validate_write_super() argument
2670 load_important_roots(struct btrfs_fs_info * fs_info) load_important_roots() argument
2687 init_tree_roots(struct btrfs_fs_info * fs_info) init_tree_roots() argument
2769 btrfs_init_fs_info(struct btrfs_fs_info * fs_info) btrfs_init_fs_info() argument
2911 init_mount_fs_info(struct btrfs_fs_info * fs_info,struct super_block * sb) init_mount_fs_info() argument
2964 struct btrfs_fs_info *fs_info = data; btrfs_uuid_rescan_kthread() local
2983 btrfs_check_uuid_tree(struct btrfs_fs_info * fs_info) btrfs_check_uuid_tree() argument
2999 btrfs_cleanup_fs_roots(struct btrfs_fs_info * fs_info) btrfs_cleanup_fs_roots() argument
3054 btrfs_start_pre_rw_mount(struct btrfs_fs_info * fs_info) btrfs_start_pre_rw_mount() argument
3187 btrfs_check_features(struct btrfs_fs_info * fs_info,bool is_rw_mount) btrfs_check_features() argument
3288 struct btrfs_fs_info *fs_info = btrfs_sb(sb); open_ctree() local
3728 struct btrfs_fs_info *fs_info = device->fs_info; write_dev_supers() local
4000 write_all_supers(struct btrfs_fs_info * fs_info,int max_mirrors) write_all_supers() argument
4113 btrfs_drop_and_free_fs_root(struct btrfs_fs_info * fs_info,struct btrfs_root * root) btrfs_drop_and_free_fs_root() argument
4137 btrfs_commit_super(struct btrfs_fs_info * fs_info) btrfs_commit_super() argument
4151 warn_about_uncommitted_trans(struct btrfs_fs_info * fs_info) warn_about_uncommitted_trans() argument
4191 close_ctree(struct btrfs_fs_info * fs_info) close_ctree() argument
4434 struct btrfs_fs_info *fs_info = buf->fs_info; btrfs_mark_buffer_dirty() local
4458 __btrfs_btree_balance_dirty(struct btrfs_fs_info * fs_info,int flush_delayed) __btrfs_btree_balance_dirty() argument
4481 btrfs_btree_balance_dirty(struct btrfs_fs_info * fs_info) btrfs_btree_balance_dirty() argument
4486 btrfs_btree_balance_dirty_nodelay(struct btrfs_fs_info * fs_info) btrfs_btree_balance_dirty_nodelay() argument
4491 btrfs_error_commit_super(struct btrfs_fs_info * fs_info) btrfs_error_commit_super() argument
4500 btrfs_drop_all_logs(struct btrfs_fs_info * fs_info) btrfs_drop_all_logs() argument
4545 btrfs_destroy_all_ordered_extents(struct btrfs_fs_info * fs_info) btrfs_destroy_all_ordered_extents() argument
4608 btrfs_destroy_all_delalloc_inodes(struct btrfs_fs_info * fs_info) btrfs_destroy_all_delalloc_inodes() argument
4630 btrfs_destroy_marked_extents(struct btrfs_fs_info * fs_info,struct extent_io_tree * dirty_pages,int mark) btrfs_destroy_marked_extents() argument
4657 btrfs_destroy_pinned_extent(struct btrfs_fs_info * fs_info,struct extent_io_tree * unpin) btrfs_destroy_pinned_extent() argument
4708 btrfs_cleanup_dirty_bgs(struct btrfs_transaction * cur_trans,struct btrfs_fs_info * fs_info) btrfs_cleanup_dirty_bgs() argument
4754 btrfs_free_all_qgroup_pertrans(struct btrfs_fs_info * fs_info) btrfs_free_all_qgroup_pertrans() argument
4782 struct btrfs_fs_info *fs_info = cur_trans->fs_info; btrfs_cleanup_one_transaction() local
4810 btrfs_cleanup_transaction(struct btrfs_fs_info * fs_info) btrfs_cleanup_transaction() argument
[all...]
H A Dfs.c60 bool btrfs_exclop_start(struct btrfs_fs_info *fs_info, in btrfs_exclop_start() argument
65 spin_lock(&fs_info->super_lock); in btrfs_exclop_start()
66 if (fs_info->exclusive_operation == BTRFS_EXCLOP_NONE) { in btrfs_exclop_start()
67 fs_info->exclusive_operation = type; in btrfs_exclop_start()
70 spin_unlock(&fs_info->super_lock); in btrfs_exclop_start()
86 bool btrfs_exclop_start_try_lock(struct btrfs_fs_info *fs_info, in btrfs_exclop_start_try_lock() argument
89 spin_lock(&fs_info->super_lock); in btrfs_exclop_start_try_lock()
90 if (fs_info->exclusive_operation == type || in btrfs_exclop_start_try_lock()
91 (fs_info->exclusive_operation == BTRFS_EXCLOP_BALANCE_PAUSED && in btrfs_exclop_start_try_lock()
95 spin_unlock(&fs_info in btrfs_exclop_start_try_lock()
99 btrfs_exclop_start_unlock(struct btrfs_fs_info * fs_info) btrfs_exclop_start_unlock() argument
104 btrfs_exclop_finish(struct btrfs_fs_info * fs_info) btrfs_exclop_finish() argument
112 btrfs_exclop_balance(struct btrfs_fs_info * fs_info,enum btrfs_exclusive_operation op) btrfs_exclop_balance() argument
137 __btrfs_set_fs_incompat(struct btrfs_fs_info * fs_info,u64 flag,const char * name) __btrfs_set_fs_incompat() argument
160 __btrfs_clear_fs_incompat(struct btrfs_fs_info * fs_info,u64 flag,const char * name) __btrfs_clear_fs_incompat() argument
183 __btrfs_set_fs_compat_ro(struct btrfs_fs_info * fs_info,u64 flag,const char * name) __btrfs_set_fs_compat_ro() argument
206 __btrfs_clear_fs_compat_ro(struct btrfs_fs_info * fs_info,u64 flag,const char * name) __btrfs_clear_fs_compat_ro() argument
[all...]
H A Dtransaction.c147 btrfs_err(transaction->fs_info, in btrfs_put_transaction()
167 spin_lock(&transaction->fs_info->unused_bgs_lock); in btrfs_put_transaction()
169 spin_unlock(&transaction->fs_info->unused_bgs_lock); in btrfs_put_transaction()
181 struct btrfs_fs_info *fs_info = trans->fs_info; in switch_commit_roots() local
190 down_write(&fs_info->commit_root_sem); in switch_commit_roots()
192 if (test_bit(BTRFS_FS_RELOC_RUNNING, &fs_info->flags)) in switch_commit_roots()
193 fs_info->last_reloc_trans = trans->transid; in switch_commit_roots()
212 btrfs_drop_and_free_fs_root(fs_info, root); in switch_commit_roots()
217 up_write(&fs_info in switch_commit_roots()
254 struct btrfs_fs_info *fs_info = trans->fs_info; btrfs_trans_release_chunk_metadata() local
267 join_transaction(struct btrfs_fs_info * fs_info,unsigned int type) join_transaction() argument
409 struct btrfs_fs_info *fs_info = root->fs_info; record_root_in_trans() local
469 struct btrfs_fs_info *fs_info = root->fs_info; btrfs_add_dropped_root() local
488 struct btrfs_fs_info *fs_info = root->fs_info; btrfs_record_root_in_trans() local
521 wait_current_trans(struct btrfs_fs_info * fs_info) wait_current_trans() argument
541 may_wait_transaction(struct btrfs_fs_info * fs_info,int type) may_wait_transaction() argument
554 struct btrfs_fs_info *fs_info = root->fs_info; need_reserve_reloc_root() local
565 btrfs_reserve_trans_metadata(struct btrfs_fs_info * fs_info,enum btrfs_reserve_flush_enum flush,u64 num_bytes,u64 * delayed_refs_bytes) btrfs_reserve_trans_metadata() argument
599 struct btrfs_fs_info *fs_info = root->fs_info; start_transaction() local
901 struct btrfs_fs_info *fs_info = commit->fs_info; wait_for_commit() local
943 btrfs_wait_for_commit(struct btrfs_fs_info * fs_info,u64 transid) btrfs_wait_for_commit() argument
1002 btrfs_throttle(struct btrfs_fs_info * fs_info) btrfs_throttle() argument
1024 struct btrfs_fs_info *fs_info = trans->fs_info; btrfs_trans_release_metadata() local
1123 btrfs_write_marked_extents(struct btrfs_fs_info * fs_info,struct extent_io_tree * dirty_pages,int mark) btrfs_write_marked_extents() argument
1176 __btrfs_wait_marked_extents(struct btrfs_fs_info * fs_info,struct extent_io_tree * dirty_pages) __btrfs_wait_marked_extents() argument
1210 btrfs_wait_extents(struct btrfs_fs_info * fs_info,struct extent_io_tree * dirty_pages) btrfs_wait_extents() argument
1227 struct btrfs_fs_info *fs_info = log_root->fs_info; btrfs_wait_tree_log_extents() local
1260 struct btrfs_fs_info *fs_info = trans->fs_info; btrfs_write_and_wait_transaction() local
1294 struct btrfs_fs_info *fs_info = root->fs_info; update_cowonly_root() local
1327 struct btrfs_fs_info *fs_info = trans->fs_info; commit_cowonly_roots() local
1412 btrfs_maybe_wake_unfinished_drop(struct btrfs_fs_info * fs_info) btrfs_maybe_wake_unfinished_drop() argument
1441 struct btrfs_fs_info *fs_info = root->fs_info; btrfs_add_dead_root() local
1462 struct btrfs_fs_info *fs_info = trans->fs_info; commit_fs_roots() local
1540 struct btrfs_fs_info *fs_info = src->fs_info; qgroup_account_snapshot() local
1636 struct btrfs_fs_info *fs_info = trans->fs_info; create_pending_snapshot() local
1934 update_super_roots(struct btrfs_fs_info * fs_info) update_super_roots() argument
1973 struct btrfs_fs_info *fs_info = trans->fs_info; btrfs_commit_transaction_async() local
2018 struct btrfs_fs_info *fs_info = trans->fs_info; cleanup_transaction() local
2101 struct btrfs_fs_info *fs_info = trans->fs_info; btrfs_cleanup_pending_block_groups() local
2117 btrfs_start_delalloc_flush(struct btrfs_fs_info * fs_info) btrfs_start_delalloc_flush() argument
2141 btrfs_wait_delalloc_flush(struct btrfs_fs_info * fs_info) btrfs_wait_delalloc_flush() argument
2168 update_commit_stats(struct btrfs_fs_info * fs_info) update_commit_stats() argument
2185 struct btrfs_fs_info *fs_info = trans->fs_info; btrfs_commit_transaction() local
2639 btrfs_clean_one_deleted_snapshot(struct btrfs_fs_info * fs_info) btrfs_clean_one_deleted_snapshot() argument
2685 struct btrfs_fs_info *fs_info = trans->fs_info; __btrfs_abort_transaction() local
[all...]
H A Dsubpage.c66 int btrfs_attach_folio_state(const struct btrfs_fs_info *fs_info, in btrfs_attach_folio_state() argument
85 if (type == BTRFS_SUBPAGE_METADATA && !btrfs_meta_is_subpage(fs_info)) in btrfs_attach_folio_state()
87 if (type == BTRFS_SUBPAGE_DATA && !btrfs_is_subpage(fs_info, folio)) in btrfs_attach_folio_state()
90 bfs = btrfs_alloc_folio_state(fs_info, folio_size(folio), type); in btrfs_attach_folio_state()
98 void btrfs_detach_folio_state(const struct btrfs_fs_info *fs_info, struct folio *folio, in btrfs_detach_folio_state() argument
106 if (type == BTRFS_SUBPAGE_METADATA && !btrfs_meta_is_subpage(fs_info)) in btrfs_detach_folio_state()
108 if (type == BTRFS_SUBPAGE_DATA && !btrfs_is_subpage(fs_info, folio)) in btrfs_detach_folio_state()
116 struct btrfs_folio_state *btrfs_alloc_folio_state(const struct btrfs_fs_info *fs_info, in btrfs_alloc_folio_state() argument
122 ASSERT(fs_info->sectorsize < fsize); in btrfs_alloc_folio_state()
126 (fsize >> fs_info->sectorsize_bits))); in btrfs_alloc_folio_state()
[all …]
H A Dqgroup.c33 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_btrfs_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
108 qgroup_rsv_add_by_qgroup(struct btrfs_fs_info * fs_info,struct btrfs_qgroup * dest,const struct btrfs_qgroup * src) qgroup_rsv_add_by_qgroup() argument
118 qgroup_rsv_release_by_qgroup(struct btrfs_fs_info * fs_info,struct btrfs_qgroup * dest,const struct btrfs_qgroup * src) qgroup_rsv_release_by_qgroup() argument
177 find_qgroup_rb(const struct btrfs_fs_info * fs_info,u64 qgroupid) find_qgroup_rb() argument
201 add_qgroup_rb(struct btrfs_fs_info * fs_info,struct btrfs_qgroup * prealloc,u64 qgroupid) add_qgroup_rb() argument
249 del_qgroup_rb(struct btrfs_fs_info * fs_info,u64 qgroupid) del_qgroup_rb() argument
297 add_relation_rb(struct btrfs_fs_info * fs_info,struct btrfs_qgroup_list * prealloc,u64 memberid,u64 parentid) add_relation_rb() argument
311 del_relation_rb(struct btrfs_fs_info * fs_info,u64 memberid,u64 parentid) del_relation_rb() argument
335 btrfs_verify_qgroup_counts(const struct btrfs_fs_info * fs_info,u64 qgroupid,u64 rfer,u64 excl) btrfs_verify_qgroup_counts() argument
350 qgroup_mark_inconsistent(struct btrfs_fs_info * fs_info,const char * fmt,...) qgroup_mark_inconsistent() argument
372 qgroup_read_enable_gen(struct btrfs_fs_info * fs_info,struct extent_buffer * leaf,int slot,struct btrfs_qgroup_status_item * ptr) qgroup_read_enable_gen() argument
385 btrfs_read_qgroup_config(struct btrfs_fs_info * fs_info) btrfs_read_qgroup_config() argument
598 btrfs_check_quota_leak(const struct btrfs_fs_info * fs_info) btrfs_check_quota_leak() argument
633 btrfs_free_qgroup_config(struct btrfs_fs_info * fs_info) btrfs_free_qgroup_config() argument
862 struct btrfs_fs_info *fs_info = trans->fs_info; update_qgroup_info_item() local
904 struct btrfs_fs_info *fs_info = trans->fs_info; update_qgroup_status_item() local
987 btrfs_quota_enable(struct btrfs_fs_info * fs_info,struct btrfs_ioctl_quota_ctl_args * quota_ctl_args) btrfs_quota_enable() argument
1285 flush_reservations(struct btrfs_fs_info * fs_info) flush_reservations() argument
1297 btrfs_quota_disable(struct btrfs_fs_info * fs_info) btrfs_quota_disable() argument
1413 qgroup_dirty(struct btrfs_fs_info * fs_info,struct btrfs_qgroup * qgroup) qgroup_dirty() argument
1452 __qgroup_excl_accounting(struct btrfs_fs_info * fs_info,u64 ref_root,struct btrfs_qgroup * src,int sign) __qgroup_excl_accounting() argument
1503 quick_update_accounting(struct btrfs_fs_info * fs_info,u64 src,u64 dst,int sign) quick_update_accounting() argument
1531 struct btrfs_fs_info *fs_info = trans->fs_info; btrfs_add_qgroup_relation() local
1591 struct btrfs_fs_info *fs_info = trans->fs_info; __del_qgroup_relation() local
1646 struct btrfs_fs_info *fs_info = trans->fs_info; btrfs_del_qgroup_relation() local
1658 struct btrfs_fs_info *fs_info = trans->fs_info; btrfs_create_qgroup() local
1703 can_delete_qgroup(struct btrfs_fs_info * fs_info,struct btrfs_qgroup * qgroup) can_delete_qgroup() argument
1751 struct btrfs_fs_info *fs_info = trans->fs_info; btrfs_remove_qgroup() local
1849 btrfs_qgroup_cleanup_dropped_subvolume(struct btrfs_fs_info * fs_info,u64 subvolid) btrfs_qgroup_cleanup_dropped_subvolume() argument
1887 struct btrfs_fs_info *fs_info = trans->fs_info; btrfs_limit_qgroup() local
1969 btrfs_qgroup_trace_extent_nolock(struct btrfs_fs_info * fs_info,struct btrfs_delayed_ref_root * delayed_refs,struct btrfs_qgroup_extent_record * record,u64 bytenr) btrfs_qgroup_trace_extent_nolock() argument
2038 struct btrfs_fs_info *fs_info = trans->fs_info; btrfs_qgroup_trace_extent_post() local
2105 struct btrfs_fs_info *fs_info = trans->fs_info; btrfs_qgroup_trace_extent() local
2143 struct btrfs_fs_info *fs_info = trans->fs_info; btrfs_qgroup_trace_leaf_items() local
2296 struct btrfs_fs_info *fs_info = trans->fs_info; qgroup_trace_extent_swap() local
2420 struct btrfs_fs_info *fs_info = trans->fs_info; qgroup_trace_new_subtree_blocks() local
2522 struct btrfs_fs_info *fs_info = trans->fs_info; qgroup_trace_subtree_swap() local
2584 struct btrfs_fs_info *fs_info = trans->fs_info; btrfs_qgroup_trace_subtree() local
2728 qgroup_update_refcnt(struct btrfs_fs_info * fs_info,struct ulist * roots,struct list_head * qgroups,u64 seq,int update_old) qgroup_update_refcnt() argument
2801 qgroup_update_counters(struct btrfs_fs_info * fs_info,struct list_head * qgroups,u64 nr_old_roots,u64 nr_new_roots,u64 num_bytes,u64 seq) qgroup_update_counters() argument
2916 struct btrfs_fs_info *fs_info = trans->fs_info; btrfs_qgroup_account_extent() local
2991 struct btrfs_fs_info *fs_info = trans->fs_info; btrfs_qgroup_account_extents() local
3087 struct btrfs_fs_info *fs_info = trans->fs_info; btrfs_run_qgroups() local
3132 btrfs_qgroup_check_inherit(struct btrfs_fs_info * fs_info,struct btrfs_qgroup_inherit * inherit,size_t size) btrfs_qgroup_check_inherit() argument
3188 qgroup_auto_inherit(struct btrfs_fs_info * fs_info,u64 inode_rootid,struct btrfs_qgroup_inherit ** inherit) qgroup_auto_inherit() argument
3238 qgroup_snapshot_quick_inherit(struct btrfs_fs_info * fs_info,u64 srcid,u64 parentid) qgroup_snapshot_quick_inherit() argument
3298 struct btrfs_fs_info *fs_info = trans->fs_info; btrfs_qgroup_inherit() local
3564 struct btrfs_fs_info *fs_info = root->fs_info; qgroup_reserve() local
3622 btrfs_qgroup_free_refroot(struct btrfs_fs_info * fs_info,u64 ref_root,u64 num_bytes,enum btrfs_qgroup_rsv_type type) btrfs_qgroup_free_refroot() argument
3691 struct btrfs_fs_info *fs_info = trans->fs_info; qgroup_rescan_leaf() local
3781 rescan_should_stop(struct btrfs_fs_info * fs_info) rescan_should_stop() argument
3796 struct btrfs_fs_info *fs_info = container_of(work, struct btrfs_fs_info, btrfs_qgroup_rescan_worker() local
3906 qgroup_rescan_init(struct btrfs_fs_info * fs_info,u64 progress_objectid,int init_flags) qgroup_rescan_init() argument
3970 qgroup_rescan_zero_tracking(struct btrfs_fs_info * fs_info) qgroup_rescan_zero_tracking() argument
3989 btrfs_qgroup_rescan(struct btrfs_fs_info * fs_info) btrfs_qgroup_rescan() argument
4034 btrfs_qgroup_wait_for_completion(struct btrfs_fs_info * fs_info,bool interruptible) btrfs_qgroup_wait_for_completion() argument
4061 btrfs_qgroup_rescan_resume(struct btrfs_fs_info * fs_info) btrfs_qgroup_rescan_resume() argument
4455 struct btrfs_fs_info *fs_info = root->fs_info; btrfs_qgroup_reserve_meta() local
4501 struct btrfs_fs_info *fs_info = root->fs_info; btrfs_qgroup_free_meta_all_pertrans() local
4517 struct btrfs_fs_info *fs_info = root->fs_info; __btrfs_qgroup_free_meta() local
4534 qgroup_convert_meta(struct btrfs_fs_info * fs_info,u64 ref_root,int num_bytes) qgroup_convert_meta() argument
4576 struct btrfs_fs_info *fs_info = root->fs_info; btrfs_qgroup_convert_reserved_meta() local
4701 struct btrfs_fs_info *fs_info = subvol_root->fs_info; btrfs_qgroup_add_swapped_blocks() local
4792 struct btrfs_fs_info *fs_info = root->fs_info; btrfs_qgroup_trace_subtree_after_cow() local
4875 btrfs_record_squota_delta(struct btrfs_fs_info * fs_info,const struct btrfs_squota_delta * delta) btrfs_record_squota_delta() argument
[all...]
H A Dblock-rsv.c40 * successful we subtract fs_info->nodesize from ->reserved.
104 static u64 block_rsv_release_bytes(struct btrfs_fs_info *fs_info, in block_rsv_release_bytes() argument
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_rs in btrfs_block_rsv_add()
243 btrfs_block_rsv_refill(struct btrfs_fs_info * fs_info,struct btrfs_block_rsv * block_rsv,u64 num_bytes,enum btrfs_reserve_flush_enum flush) btrfs_block_rsv_refill() argument
272 btrfs_block_rsv_release(struct btrfs_fs_info * fs_info,struct btrfs_block_rsv * block_rsv,u64 num_bytes,u64 * qgroup_to_release) btrfs_block_rsv_release() argument
323 btrfs_update_global_block_rsv(struct btrfs_fs_info * fs_info) btrfs_update_global_block_rsv() argument
403 struct btrfs_fs_info *fs_info = root->fs_info; btrfs_init_root_block_rsv() local
430 btrfs_init_global_block_rsv(struct btrfs_fs_info * fs_info) btrfs_init_global_block_rsv() argument
455 btrfs_release_global_block_rsv(struct btrfs_fs_info * fs_info) btrfs_release_global_block_rsv() argument
473 struct btrfs_fs_info *fs_info = root->fs_info; get_block_rsv() local
494 struct btrfs_fs_info *fs_info = root->fs_info; btrfs_use_block_rsv() local
563 btrfs_check_trunc_cache_free_space(const struct btrfs_fs_info * fs_info,struct btrfs_block_rsv * rsv) btrfs_check_trunc_cache_free_space() argument
[all...]
H A Ddev-replace.c66 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()
101 if (btrfs_find_device(fs_info->fs_devices, &args)) { in btrfs_init_dev_replace()
102 btrfs_err(fs_info, in btrfs_init_dev_replace()
130 btrfs_warn(fs_info, in btrfs_init_dev_replace()
161 if (btrfs_find_device(fs_info->fs_devices, &args)) { in btrfs_init_dev_replace()
162 btrfs_err(fs_info, in btrfs_init_dev_replace()
172 dev_replace->tgtdev = btrfs_find_device(fs_info in btrfs_init_dev_replace()
234 btrfs_init_dev_replace_tgtdev(struct btrfs_fs_info * fs_info,const char * device_path,struct btrfs_device * srcdev,struct btrfs_device ** device_out) btrfs_init_dev_replace_tgtdev() argument
340 struct btrfs_fs_info *fs_info = trans->fs_info; btrfs_run_dev_replace() local
440 mark_block_group_to_copy(struct btrfs_fs_info * fs_info,struct btrfs_device * src_dev) mark_block_group_to_copy() argument
538 struct btrfs_fs_info *fs_info = cache->fs_info; btrfs_finish_block_group_to_copy() local
586 btrfs_dev_replace_start(struct btrfs_fs_info * fs_info,const char * tgtdev_name,u64 srcdevid,const char * srcdev_name,int read_src) btrfs_dev_replace_start() argument
732 btrfs_dev_replace_by_ioctl(struct btrfs_fs_info * fs_info,struct btrfs_ioctl_dev_replace_args * args) btrfs_dev_replace_by_ioctl() argument
764 btrfs_rm_dev_replace_blocked(struct btrfs_fs_info * fs_info) btrfs_rm_dev_replace_blocked() argument
774 btrfs_rm_dev_replace_unblocked(struct btrfs_fs_info * fs_info) btrfs_rm_dev_replace_unblocked() argument
812 btrfs_dev_replace_update_device_in_mapping_tree(struct btrfs_fs_info * fs_info,struct btrfs_device * srcdev,struct btrfs_device * tgtdev) btrfs_dev_replace_update_device_in_mapping_tree() argument
858 btrfs_dev_replace_finishing(struct btrfs_fs_info * fs_info,int scrub_ret) btrfs_dev_replace_finishing() argument
1033 btrfs_dev_replace_progress(struct btrfs_fs_info * fs_info) btrfs_dev_replace_progress() argument
1057 btrfs_dev_replace_status(struct btrfs_fs_info * fs_info,struct btrfs_ioctl_dev_replace_args * args) btrfs_dev_replace_status() argument
1077 btrfs_dev_replace_cancel(struct btrfs_fs_info * fs_info) btrfs_dev_replace_cancel() argument
1163 btrfs_dev_replace_suspend_for_unmount(struct btrfs_fs_info * fs_info) btrfs_dev_replace_suspend_for_unmount() argument
1190 btrfs_resume_dev_replace_async(struct btrfs_fs_info * fs_info) btrfs_resume_dev_replace_async() argument
1243 struct btrfs_fs_info *fs_info = data; btrfs_dev_replace_kthread() local
1295 btrfs_bio_counter_sub(struct btrfs_fs_info * fs_info,s64 amount) btrfs_bio_counter_sub() argument
1301 btrfs_bio_counter_inc_blocked(struct btrfs_fs_info * fs_info) btrfs_bio_counter_inc_blocked() argument
[all...]
H A Dspace-info.c209 static u64 calc_chunk_size(const struct btrfs_fs_info *fs_info, u64 flags) in calc_chunk_size() argument
211 if (btrfs_is_zoned(fs_info)) in calc_chunk_size()
212 return fs_info->zone_size; in calc_chunk_size()
222 if (fs_info->fs_devices->total_rw_bytes > 50ULL * SZ_1G) in calc_chunk_size()
240 space_info->fs_info = info; in init_space_info()
261 struct btrfs_fs_info *fs_info = parent->fs_info; in create_space_info_sub_group() local
272 init_space_info(fs_info, sub_group, flags); in create_space_info_sub_group()
277 ret = btrfs_sysfs_add_space_info_type(fs_info, sub_group); in create_space_info_sub_group()
322 int btrfs_init_space_info(struct btrfs_fs_info *fs_info) in btrfs_init_space_info() argument
402 calc_effective_data_chunk_size(struct btrfs_fs_info * fs_info) calc_effective_data_chunk_size() argument
424 calc_available_free_space(struct btrfs_fs_info * fs_info,const struct btrfs_space_info * space_info,enum btrfs_reserve_flush_enum flush) calc_available_free_space() argument
493 btrfs_can_overcommit(struct btrfs_fs_info * fs_info,const struct btrfs_space_info * space_info,u64 bytes,enum btrfs_reserve_flush_enum flush) btrfs_can_overcommit() argument
526 btrfs_try_granting_tickets(struct btrfs_fs_info * fs_info,struct btrfs_space_info * space_info) btrfs_try_granting_tickets() argument
563 DUMP_BLOCK_RSV(fs_info,rsv_name) global() argument
588 dump_global_block_rsv(struct btrfs_fs_info * fs_info) dump_global_block_rsv() argument
597 __btrfs_dump_space_info(const struct btrfs_fs_info * fs_info,const struct btrfs_space_info * info) __btrfs_dump_space_info() argument
616 btrfs_dump_space_info(struct btrfs_fs_info * fs_info,struct btrfs_space_info * info,u64 bytes,bool dump_block_groups) btrfs_dump_space_info() argument
657 calc_reclaim_items_nr(const struct btrfs_fs_info * fs_info,u64 to_reclaim) calc_reclaim_items_nr() argument
673 shrink_delalloc(struct btrfs_fs_info * fs_info,struct btrfs_space_info * space_info,u64 to_reclaim,bool wait_ordered,bool for_preempt) shrink_delalloc() argument
804 flush_space(struct btrfs_fs_info * fs_info,struct btrfs_space_info * space_info,u64 num_bytes,enum btrfs_flush_state state,bool for_preempt) flush_space() argument
903 btrfs_calc_reclaim_metadata_size(struct btrfs_fs_info * fs_info,const struct btrfs_space_info * space_info) btrfs_calc_reclaim_metadata_size() argument
928 need_preemptive_reclaim(struct btrfs_fs_info * fs_info,const struct btrfs_space_info * space_info) need_preemptive_reclaim() argument
1040 steal_from_global_rsv(struct btrfs_fs_info * fs_info,struct btrfs_space_info * space_info,struct reserve_ticket * ticket) steal_from_global_rsv() argument
1087 maybe_fail_all_tickets(struct btrfs_fs_info * fs_info,struct btrfs_space_info * space_info) maybe_fail_all_tickets() argument
1134 struct btrfs_fs_info *fs_info = space_info->fs_info; do_async_reclaim_metadata_space() local
1221 struct btrfs_fs_info *fs_info; btrfs_async_reclaim_metadata_space() local
1243 struct btrfs_fs_info *fs_info; btrfs_preempt_reclaim_metadata_space() local
1380 struct btrfs_fs_info *fs_info = space_info->fs_info; do_async_reclaim_data_space() local
1453 struct btrfs_fs_info *fs_info; btrfs_async_reclaim_data_space() local
1464 btrfs_init_async_reclaim_work(struct btrfs_fs_info * fs_info) btrfs_init_async_reclaim_work() argument
1492 priority_reclaim_metadata_space(struct btrfs_fs_info * fs_info,struct btrfs_space_info * space_info,struct reserve_ticket * ticket,const enum btrfs_flush_state * states,int states_nr) priority_reclaim_metadata_space() argument
1551 priority_reclaim_data_space(struct btrfs_fs_info * fs_info,struct btrfs_space_info * space_info,struct reserve_ticket * ticket) priority_reclaim_data_space() argument
1625 handle_reserve_ticket(struct btrfs_fs_info * fs_info,struct btrfs_space_info * space_info,struct reserve_ticket * ticket,u64 start_ns,u64 orig_bytes,enum btrfs_reserve_flush_enum flush) handle_reserve_ticket() argument
1681 maybe_clamp_preempt(struct btrfs_fs_info * fs_info,struct btrfs_space_info * space_info) maybe_clamp_preempt() argument
1730 __reserve_bytes(struct btrfs_fs_info * fs_info,struct btrfs_space_info * space_info,u64 orig_bytes,enum btrfs_reserve_flush_enum flush) __reserve_bytes() argument
1877 btrfs_reserve_metadata_bytes(struct btrfs_fs_info * fs_info,struct btrfs_space_info * space_info,u64 orig_bytes,enum btrfs_reserve_flush_enum flush) btrfs_reserve_metadata_bytes() argument
1908 struct btrfs_fs_info *fs_info = space_info->fs_info; btrfs_reserve_data_bytes() local
1927 btrfs_dump_space_info_for_trans_abort(struct btrfs_fs_info * fs_info) btrfs_dump_space_info_for_trans_abort() argument
2000 calc_unalloc_target(struct btrfs_fs_info * fs_info) calc_unalloc_target() argument
2032 struct btrfs_fs_info *fs_info = space_info->fs_info; calc_dynamic_reclaim_threshold() local
2065 struct btrfs_fs_info *fs_info = space_info->fs_info; is_reclaim_urgent() local
2159 btrfs_reclaim_sweep(const struct btrfs_fs_info * fs_info) btrfs_reclaim_sweep() argument
2174 struct btrfs_fs_info *fs_info = space_info->fs_info; btrfs_return_free_space() local
[all...]
H A Dsuper.c71 struct btrfs_fs_info *fs_info = btrfs_sb(sb); in btrfs_put_super() local
73 btrfs_info(fs_info, "last unmount of filesystem %pU", fs_info->fs_devices->fsid); in btrfs_put_super()
74 close_ctree(fs_info); in btrfs_put_super()
654 static void btrfs_clear_oneshot_options(struct btrfs_fs_info *fs_info) in btrfs_clear_oneshot_options() argument
656 btrfs_clear_opt(fs_info->mount_opt, USEBACKUPROOT); in btrfs_clear_oneshot_options()
657 btrfs_clear_opt(fs_info->mount_opt, CLEAR_CACHE); in btrfs_clear_oneshot_options()
658 btrfs_clear_opt(fs_info->mount_opt, NOSPACECACHE); in btrfs_clear_oneshot_options()
661 static bool check_ro_option(const struct btrfs_fs_info *fs_info, in check_ro_option() argument
666 btrfs_err(fs_info, "%s must be used with ro mount option", in check_ro_option()
724 void btrfs_set_free_space_cache_settings(struct btrfs_fs_info *fs_info) in btrfs_set_free_space_cache_settings() argument
[all …]
H A Dscrub.c197 struct btrfs_fs_info *fs_info; member
355 static int init_scrub_stripe(struct btrfs_fs_info *fs_info, in init_scrub_stripe() argument
362 stripe->nr_sectors = BTRFS_STRIPE_LEN >> fs_info->sectorsize_bits; in init_scrub_stripe()
380 stripe->csums = kcalloc(BTRFS_STRIPE_LEN >> fs_info->sectorsize_bits, in init_scrub_stripe()
381 fs_info->csum_size, GFP_KERNEL); in init_scrub_stripe()
397 static void __scrub_blocked_if_needed(struct btrfs_fs_info *fs_info) in __scrub_blocked_if_needed() argument
399 while (atomic_read(&fs_info->scrub_pause_req)) { in __scrub_blocked_if_needed()
400 mutex_unlock(&fs_info->scrub_lock); in __scrub_blocked_if_needed()
401 wait_event(fs_info->scrub_pause_wait, in __scrub_blocked_if_needed()
402 atomic_read(&fs_info in __scrub_blocked_if_needed()
407 scrub_pause_on(struct btrfs_fs_info * fs_info) scrub_pause_on() argument
413 scrub_pause_off(struct btrfs_fs_info * fs_info) scrub_pause_off() argument
423 scrub_blocked_if_needed(struct btrfs_fs_info * fs_info) scrub_blocked_if_needed() argument
449 scrub_setup_ctx(struct btrfs_fs_info * fs_info,int is_dev_replace) scrub_setup_ctx() argument
504 struct btrfs_fs_info *fs_info = swarn->dev->fs_info; scrub_print_warning_inode() local
587 struct btrfs_fs_info *fs_info = dev->fs_info; scrub_print_common_warning() local
701 struct btrfs_fs_info *fs_info = stripe->bg->fs_info; scrub_verify_one_metadata() local
788 struct btrfs_fs_info *fs_info = stripe->bg->fs_info; scrub_verify_one_sector() local
849 struct btrfs_fs_info *fs_info = stripe->bg->fs_info; scrub_verify_one_stripe() local
881 struct btrfs_fs_info *fs_info = stripe->bg->fs_info; scrub_repair_read_endio() local
934 struct btrfs_fs_info *fs_info = stripe->bg->fs_info; scrub_stripe_submit_repair_read() local
978 struct btrfs_fs_info *fs_info = sctx->fs_info; scrub_stripe_report_errors() local
1136 struct btrfs_fs_info *fs_info = sctx->fs_info; scrub_stripe_read_repair_worker() local
1254 struct btrfs_fs_info *fs_info = stripe->bg->fs_info; scrub_write_endio() local
1284 struct btrfs_fs_info *fs_info = sctx->fs_info; scrub_submit_write_bio() local
1325 struct btrfs_fs_info *fs_info = stripe->bg->fs_info; scrub_write_sectors() local
1459 struct btrfs_fs_info *fs_info = path->nodes[0]->fs_info; compare_extent_item_range() local
1498 struct btrfs_fs_info *fs_info = extent_root->fs_info; find_first_extent_item() local
1584 struct btrfs_fs_info *fs_info = sctx->fs_info; sync_write_pointer_for_zoned() local
1604 fill_one_extent_info(struct btrfs_fs_info * fs_info,struct scrub_stripe * stripe,u64 extent_start,u64 extent_len,u64 extent_flags,u64 extent_gen) fill_one_extent_info() argument
1647 struct btrfs_fs_info *fs_info = bg->fs_info; scrub_find_fill_first_stripe() local
1779 struct btrfs_fs_info *fs_info = stripe->bg->fs_info; scrub_submit_extent_sector_read() local
1860 struct btrfs_fs_info *fs_info = sctx->fs_info; scrub_submit_initial_read() local
1906 struct btrfs_fs_info *fs_info = stripe->bg->fs_info; stripe_has_metadata_error() local
1942 struct btrfs_fs_info *fs_info = sctx->fs_info; flush_scrub_stripes() local
2062 struct btrfs_fs_info *fs_info = sctx->fs_info; scrub_raid56_parity_stripe() local
2234 struct btrfs_fs_info *fs_info = sctx->fs_info; scrub_simple_mirror() local
2367 struct btrfs_fs_info *fs_info = sctx->fs_info; scrub_stripe() local
2532 struct btrfs_fs_info *fs_info = sctx->fs_info; scrub_chunk() local
2572 struct btrfs_fs_info *fs_info = cache->fs_info; finish_extent_writes_for_zoned() local
2590 struct btrfs_fs_info *fs_info = sctx->fs_info; scrub_enumerate_chunks() local
2883 struct btrfs_fs_info *fs_info = sctx->fs_info; scrub_one_super() local
2917 struct btrfs_fs_info *fs_info = sctx->fs_info; scrub_supers() local
2965 scrub_workers_put(struct btrfs_fs_info * fs_info) scrub_workers_put() argument
2982 scrub_workers_get(struct btrfs_fs_info * fs_info) scrub_workers_get() argument
3014 btrfs_scrub_dev(struct btrfs_fs_info * fs_info,u64 devid,u64 start,u64 end,struct btrfs_scrub_progress * progress,int readonly,int is_dev_replace) btrfs_scrub_dev() argument
3186 btrfs_scrub_pause(struct btrfs_fs_info * fs_info) btrfs_scrub_pause() argument
3201 btrfs_scrub_continue(struct btrfs_fs_info * fs_info) btrfs_scrub_continue() argument
3207 btrfs_scrub_cancel(struct btrfs_fs_info * fs_info) btrfs_scrub_cancel() argument
3230 struct btrfs_fs_info *fs_info = dev->fs_info; btrfs_scrub_cancel_dev() local
3251 btrfs_scrub_progress(struct btrfs_fs_info * fs_info,u64 devid,struct btrfs_scrub_progress * progress) btrfs_scrub_progress() argument
[all...]
H A Dblock-group.c28 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()
40 if (!btrfs_is_zoned(block_group->fs_info)) in has_unwritten_metadata()
56 static u64 get_restripe_target(const struct btrfs_fs_info *fs_info, u64 flags) in get_restripe_target() argument
58 const struct btrfs_balance_control *bctl = fs_info->balance_ctl; in get_restripe_target()
85 static u64 btrfs_reduce_alloc_profile(struct btrfs_fs_info *fs_info, u64 flags) in btrfs_reduce_alloc_profile() argument
87 u64 num_devices = fs_info->fs_devices->rw_devices; in btrfs_reduce_alloc_profile()
96 spin_lock(&fs_info in btrfs_reduce_alloc_profile()
134 btrfs_get_alloc_profile(struct btrfs_fs_info * fs_info,u64 orig_flags) btrfs_get_alloc_profile() argument
209 struct btrfs_fs_info *fs_info = block_group->fs_info; btrfs_add_block_group_cache() local
288 struct btrfs_fs_info *fs_info = cache->fs_info; btrfs_next_block_group() local
327 btrfs_inc_nocow_writers(struct btrfs_fs_info * fs_info,u64 bytenr) btrfs_inc_nocow_writers() argument
378 btrfs_dec_block_group_reservations(struct btrfs_fs_info * fs_info,const u64 start) btrfs_dec_block_group_reservations() argument
499 struct btrfs_fs_info *fs_info = block_group->fs_info; fragment_free_space() local
595 struct btrfs_fs_info *fs_info = block_group->fs_info; sample_block_group_extent_item() local
681 struct btrfs_fs_info *fs_info = block_group->fs_info; load_block_group_size_class() local
714 struct btrfs_fs_info *fs_info = block_group->fs_info; load_extent_tree_free() local
855 struct btrfs_fs_info *fs_info; caching_thread() local
928 struct btrfs_fs_info *fs_info = cache->fs_info; btrfs_cache_block_group() local
980 clear_avail_alloc_bits(struct btrfs_fs_info * fs_info,u64 flags) clear_avail_alloc_bits() argument
1003 clear_incompat_bg_bits(struct btrfs_fs_info * fs_info,u64 flags) clear_incompat_bg_bits() argument
1033 btrfs_block_group_root(struct btrfs_fs_info * fs_info) btrfs_block_group_root() argument
1044 struct btrfs_fs_info *fs_info = trans->fs_info; remove_block_group_item() local
1067 struct btrfs_fs_info *fs_info = trans->fs_info; btrfs_remove_block_group() local
1313 btrfs_start_trans_remove_block_group(struct btrfs_fs_info * fs_info,const u64 chunk_offset) btrfs_start_trans_remove_block_group() argument
1436 struct btrfs_fs_info *fs_info = trans->fs_info; clean_pinned_extents() local
1490 struct btrfs_fs_info *fs_info = bg->fs_info; btrfs_link_bg_list() local
1507 btrfs_delete_unused_bgs(struct btrfs_fs_info * fs_info) btrfs_delete_unused_bgs() argument
1771 struct btrfs_fs_info *fs_info = bg->fs_info; btrfs_mark_bg_unused() local
1801 btrfs_should_reclaim(const struct btrfs_fs_info * fs_info) btrfs_should_reclaim() argument
1831 struct btrfs_fs_info *fs_info = btrfs_reclaim_bgs_work() local
2029 btrfs_reclaim_bgs(struct btrfs_fs_info * fs_info) btrfs_reclaim_bgs() argument
2040 struct btrfs_fs_info *fs_info = bg->fs_info; btrfs_mark_bg_to_reclaim() local
2046 read_bg_from_eb(struct btrfs_fs_info * fs_info,const struct btrfs_key * key,const struct btrfs_path * path) read_bg_from_eb() argument
2093 find_first_block_group(struct btrfs_fs_info * fs_info,struct btrfs_path * path,const struct btrfs_key * key) find_first_block_group() argument
2110 set_avail_alloc_bits(struct btrfs_fs_info * fs_info,u64 flags) set_avail_alloc_bits() argument
2139 btrfs_rmap_block(struct btrfs_fs_info * fs_info,u64 chunk_start,u64 physical,u64 ** logical,int * naddrs,int * stripe_len) btrfs_rmap_block() argument
2216 struct btrfs_fs_info *fs_info = cache->fs_info; exclude_super_stripes() local
2269 btrfs_create_block_group_cache(struct btrfs_fs_info * fs_info,u64 start) btrfs_create_block_group_cache() argument
2313 check_chunk_block_group_mappings(struct btrfs_fs_info * fs_info) check_chunk_block_group_mappings() argument
2483 fill_dummy_bgs(struct btrfs_fs_info * fs_info) fill_dummy_bgs() argument
2653 struct btrfs_fs_info *fs_info = trans->fs_info; insert_block_group_item() local
2686 struct btrfs_fs_info *fs_info = device->fs_info; insert_dev_extent() local
2727 struct btrfs_fs_info *fs_info = trans->fs_info; insert_dev_extents() local
2772 struct btrfs_fs_info *fs_info = trans->fs_info; btrfs_create_pending_block_groups() local
2861 calculate_global_root_id(const struct btrfs_fs_info * fs_info,u64 offset) calculate_global_root_id() argument
2882 struct btrfs_fs_info *fs_info = trans->fs_info; btrfs_make_block_group() local
2978 struct btrfs_fs_info *fs_info = cache->fs_info; btrfs_inc_block_group_ro() local
3122 struct btrfs_fs_info *fs_info = trans->fs_info; update_block_group_item() local
3191 struct btrfs_fs_info *fs_info = block_group->fs_info; cache_save_setup() local
3353 struct btrfs_fs_info *fs_info = trans->fs_info; btrfs_setup_space_cache() local
3390 struct btrfs_fs_info *fs_info = trans->fs_info; btrfs_start_dirty_block_groups() local
3555 struct btrfs_fs_info *fs_info = trans->fs_info; btrfs_write_dirty_block_groups() local
3885 should_alloc_chunk(const struct btrfs_fs_info * fs_info,const struct btrfs_space_info * sinfo,int force) should_alloc_chunk() argument
4142 struct btrfs_fs_info *fs_info = trans->fs_info; btrfs_chunk_alloc() local
4277 get_profile_num_devs(const struct btrfs_fs_info * fs_info,u64 type) get_profile_num_devs() argument
4292 struct btrfs_fs_info *fs_info = trans->fs_info; reserve_chunk_space() local
4369 struct btrfs_fs_info *fs_info = trans->fs_info; check_system_chunk() local
4399 struct btrfs_fs_info *fs_info = trans->fs_info; btrfs_reserve_chunk_metadata() local
4587 struct btrfs_fs_info *fs_info = block_group->fs_info; btrfs_unfreeze_block_group() local
[all...]
H A Dsubpage.h104 static inline bool btrfs_meta_is_subpage(const struct btrfs_fs_info *fs_info) in btrfs_meta_is_subpage() argument
106 return fs_info->nodesize < PAGE_SIZE; in btrfs_meta_is_subpage()
108 static inline bool btrfs_is_subpage(const struct btrfs_fs_info *fs_info, in btrfs_is_subpage() argument
113 return fs_info->sectorsize < folio_size(folio); in btrfs_is_subpage()
116 int btrfs_attach_folio_state(const struct btrfs_fs_info *fs_info,
118 void btrfs_detach_folio_state(const struct btrfs_fs_info *fs_info, struct folio *folio,
122 struct btrfs_folio_state *btrfs_alloc_folio_state(const struct btrfs_fs_info *fs_info,
129 void btrfs_folio_inc_eb_refs(const struct btrfs_fs_info *fs_info, struct folio *folio);
130 void btrfs_folio_dec_eb_refs(const struct btrfs_fs_info *fs_info, struct folio *folio);
132 void btrfs_folio_end_lock(const struct btrfs_fs_info *fs_info,
192 btrfs_folio_clamp_finish_io(struct btrfs_fs_info * fs_info,struct folio * locked_folio,u64 start,u32 len) btrfs_folio_clamp_finish_io() argument
[all...]
H A Ddisk-io.h44 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,
56 void __cold close_ctree(struct btrfs_fs_info *fs_info);
57 int btrfs_validate_super(const struct btrfs_fs_info *fs_info,
59 int btrfs_check_features(struct btrfs_fs_info *fs_info, bool is_rw_mount);
60 int write_all_supers(struct btrfs_fs_info *fs_info, in
[all...]
H A Dfs.h142 * main phase. The fs_info::balance_ctl is initialized.
898 #define folio_to_fs_info(_folio) (folio_to_inode(_folio)->root->fs_info)
901 struct inode *: (_inode)))->root->fs_info)
908 static inline u64 btrfs_get_fs_generation(const struct btrfs_fs_info *fs_info) in btrfs_get_fs_generation() argument
910 return READ_ONCE(fs_info->generation); in btrfs_get_fs_generation()
913 static inline void btrfs_set_fs_generation(struct btrfs_fs_info *fs_info, u64 gen) in btrfs_set_fs_generation() argument
915 WRITE_ONCE(fs_info->generation, gen); in btrfs_set_fs_generation()
918 static inline u64 btrfs_get_last_trans_committed(const struct btrfs_fs_info *fs_info) in btrfs_get_last_trans_committed() argument
920 return READ_ONCE(fs_info->last_trans_committed); in btrfs_get_last_trans_committed()
923 static inline void btrfs_set_last_trans_committed(struct btrfs_fs_info *fs_info, u6 argument
928 btrfs_set_last_root_drop_gen(struct btrfs_fs_info * fs_info,u64 gen) btrfs_set_last_root_drop_gen() argument
934 btrfs_get_last_root_drop_gen(const struct btrfs_fs_info * fs_info) btrfs_get_last_root_drop_gen() argument
944 btrfs_csum_bytes_to_leaves(const struct btrfs_fs_info * fs_info,u64 csum_bytes) btrfs_csum_bytes_to_leaves() argument
955 btrfs_calc_insert_metadata_size(const struct btrfs_fs_info * fs_info,unsigned num_items) btrfs_calc_insert_metadata_size() argument
965 btrfs_calc_metadata_size(const struct btrfs_fs_info * fs_info,unsigned num_items) btrfs_calc_metadata_size() argument
974 BTRFS_BYTES_TO_BLKS(fs_info,bytes) global() argument
976 btrfs_is_zoned(const struct btrfs_fs_info * fs_info) btrfs_is_zoned() argument
984 count_max_extents(const struct btrfs_fs_info * fs_info,u64 size) count_max_extents() argument
994 btrfs_blocks_per_folio(const struct btrfs_fs_info * fs_info,const struct folio * folio) btrfs_blocks_per_folio() argument
1032 __btrfs_fs_incompat(fs_info,flags) global() argument
1035 __btrfs_fs_compat_ro(fs_info,flags) global() argument
1044 btrfs_fs_incompat(fs_info,opt) global() argument
1053 btrfs_fs_compat_ro(fs_info,opt) global() argument
1059 btrfs_test_opt(fs_info,opt) global() argument
1062 btrfs_fs_closing(const struct btrfs_fs_info * fs_info) btrfs_fs_closing() argument
1081 btrfs_need_cleaner_sleep(const struct btrfs_fs_info * fs_info) btrfs_need_cleaner_sleep() argument
1087 btrfs_wake_unfinished_drop(struct btrfs_fs_info * fs_info) btrfs_wake_unfinished_drop() argument
1092 BTRFS_FS_ERROR(fs_info) global() argument
1094 BTRFS_FS_LOG_CLEANUP_ERROR(fs_info) global() argument
1110 btrfs_is_testing(const struct btrfs_fs_info * fs_info) btrfs_is_testing() argument
1121 btrfs_is_testing(const struct btrfs_fs_info * fs_info) btrfs_is_testing() argument
[all...]
H A Dsysfs.c121 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()
179 struct btrfs_fs_info *fs_info = to_fs_info(kobj); in btrfs_feature_attr_show() local
181 if (fs_info) { in btrfs_feature_attr_show()
182 u64 features = get_features(fs_info, fa->feature_set); in btrfs_feature_attr_show()
195 struct btrfs_fs_info *fs_info; in btrfs_feature_attr_store() local
201 fs_info = to_fs_info(kobj); in btrfs_feature_attr_store()
202 if (!fs_info) in btrfs_feature_attr_store()
262 struct btrfs_fs_info *fs_info = to_fs_info(kobj); btrfs_feature_visible() local
468 struct btrfs_fs_info *fs_info = discard_to_fs_info(kobj); btrfs_discardable_bytes_show() local
479 struct btrfs_fs_info *fs_info = discard_to_fs_info(kobj); btrfs_discardable_extents_show() local
490 struct btrfs_fs_info *fs_info = discard_to_fs_info(kobj); btrfs_discard_bitmap_bytes_show() local
501 struct btrfs_fs_info *fs_info = discard_to_fs_info(kobj); btrfs_discard_bytes_saved_show() local
512 struct btrfs_fs_info *fs_info = discard_to_fs_info(kobj); btrfs_discard_extent_bytes_show() local
523 struct btrfs_fs_info *fs_info = discard_to_fs_info(kobj); btrfs_discard_iops_limit_show() local
533 struct btrfs_fs_info *fs_info = discard_to_fs_info(kobj); btrfs_discard_iops_limit_store() local
554 struct btrfs_fs_info *fs_info = discard_to_fs_info(kobj); btrfs_discard_kbps_limit_show() local
564 struct btrfs_fs_info *fs_info = discard_to_fs_info(kobj); btrfs_discard_kbps_limit_store() local
584 struct btrfs_fs_info *fs_info = discard_to_fs_info(kobj); btrfs_discard_max_discard_size_show() local
594 struct btrfs_fs_info *fs_info = discard_to_fs_info(kobj); btrfs_discard_max_discard_size_store() local
668 struct btrfs_fs_info *fs_info = to_fs_info(kobj->parent); global_rsv_size_show() local
677 struct btrfs_fs_info *fs_info = to_fs_info(kobj->parent); global_rsv_reserved_show() local
764 struct btrfs_fs_info *fs_info = to_fs_info(get_btrfs_kobj(kobj)); btrfs_chunk_size_store() local
852 struct btrfs_fs_info *fs_info = to_fs_info(get_btrfs_kobj(kobj)); btrfs_force_chunk_alloc_store() local
1068 struct btrfs_fs_info *fs_info = to_fs_info(kobj); btrfs_label_show() local
1083 struct btrfs_fs_info *fs_info = to_fs_info(kobj); btrfs_label_store() local
1119 struct btrfs_fs_info *fs_info = to_fs_info(kobj); btrfs_nodesize_show() local
1129 struct btrfs_fs_info *fs_info = to_fs_info(kobj); btrfs_sectorsize_show() local
1139 struct btrfs_fs_info *fs_info = to_fs_info(kobj); btrfs_commit_stats_show() local
1164 struct btrfs_fs_info *fs_info = to_fs_info(kobj); btrfs_commit_stats_store() local
1189 struct btrfs_fs_info *fs_info = to_fs_info(kobj); btrfs_clone_alignment_show() local
1199 struct btrfs_fs_info *fs_info = to_fs_info(kobj); quota_override_show() local
1210 struct btrfs_fs_info *fs_info = to_fs_info(kobj); quota_override_store() local
1239 struct btrfs_fs_info *fs_info = to_fs_info(kobj); btrfs_metadata_uuid_show() local
1249 struct btrfs_fs_info *fs_info = to_fs_info(kobj); btrfs_checksum_show() local
1262 struct btrfs_fs_info *fs_info = to_fs_info(kobj); btrfs_exclusive_operation_show() local
1301 struct btrfs_fs_info *fs_info = to_fs_info(kobj); btrfs_generation_show() local
1310 struct btrfs_fs_info *fs_info = to_fs_info(kobj); btrfs_temp_fsid_show() local
1506 struct btrfs_fs_info *fs_info = to_fs_info(kobj); btrfs_bg_reclaim_threshold_show() local
1515 struct btrfs_fs_info *fs_info = to_fs_info(kobj); btrfs_bg_reclaim_threshold_store() local
1657 addrm_unknown_feature_attrs(struct btrfs_fs_info * fs_info,bool add) addrm_unknown_feature_attrs() argument
1748 btrfs_sysfs_remove_mounted(struct btrfs_fs_info * fs_info) btrfs_sysfs_remove_mounted() argument
1858 struct btrfs_fs_info *fs_info = cache->fs_info; btrfs_sysfs_add_block_group_type() local
1980 btrfs_sysfs_add_space_info_type(struct btrfs_fs_info * fs_info,struct btrfs_space_info * space_info) btrfs_sysfs_add_space_info_type() argument
2324 btrfs_sysfs_add_mounted(struct btrfs_fs_info * fs_info) btrfs_sysfs_add_mounted() argument
2396 struct btrfs_fs_info *fs_info = to_fs_info(qgroups_kobj->parent); qgroup_enabled_show() local
2411 struct btrfs_fs_info *fs_info = to_fs_info(qgroups_kobj->parent); qgroup_mode_show() local
2438 struct btrfs_fs_info *fs_info = to_fs_info(qgroups_kobj->parent); qgroup_inconsistent_show() local
2453 struct btrfs_fs_info *fs_info = to_fs_info(qgroups_kobj->parent); qgroup_drop_subtree_thres_show() local
2467 struct btrfs_fs_info *fs_info = to_fs_info(qgroups_kobj->parent); qgroup_drop_subtree_thres_store() local
2582 btrfs_sysfs_add_one_qgroup(struct btrfs_fs_info * fs_info,struct btrfs_qgroup * qgroup) btrfs_sysfs_add_one_qgroup() argument
2604 btrfs_sysfs_del_qgroups(struct btrfs_fs_info * fs_info) btrfs_sysfs_del_qgroups() argument
2623 btrfs_sysfs_add_qgroups(struct btrfs_fs_info * fs_info) btrfs_sysfs_add_qgroups() argument
2659 btrfs_sysfs_del_one_qgroup(struct btrfs_fs_info * fs_info,struct btrfs_qgroup * qgroup) btrfs_sysfs_del_one_qgroup() argument
2675 btrfs_sysfs_feature_update(struct btrfs_fs_info * fs_info) btrfs_sysfs_feature_update() argument
[all...]
H A Dzoned.c201 const sector_t zone_sectors = device->fs_info->zone_size >> SECTOR_SHIFT; in emulate_report_zones()
270 btrfs_err(device->fs_info, in btrfs_get_dev_zones()
292 static int calculate_emulated_zone_size(struct btrfs_fs_info *fs_info) in calculate_emulated_zone_size() argument
295 struct btrfs_root *root = fs_info->dev_root; in calculate_emulated_zone_size()
324 fs_info->zone_size = btrfs_dev_extent_length(leaf, dext); in calculate_emulated_zone_size()
328 int btrfs_get_dev_zone_info_all_devices(struct btrfs_fs_info *fs_info) in btrfs_get_dev_zone_info_all_devices() argument
330 struct btrfs_fs_devices *fs_devices = fs_info->fs_devices; in btrfs_get_dev_zone_info_all_devices()
335 if (!btrfs_fs_incompat(fs_info, ZONED)) in btrfs_get_dev_zone_info_all_devices()
355 struct btrfs_fs_info *fs_info = device->fs_info; in btrfs_get_dev_zone_info() local
372 if (!btrfs_fs_incompat(fs_info, ZONED)) in btrfs_get_dev_zone_info()
[all …]
H A Dextent_io.c43 struct btrfs_fs_info *fs_info = eb->fs_info; in btrfs_leak_debug_add_eb() local
46 spin_lock_irqsave(&fs_info->eb_leak_lock, flags); in btrfs_leak_debug_add_eb()
47 list_add(&eb->leak_list, &fs_info->allocated_ebs); in btrfs_leak_debug_add_eb()
48 spin_unlock_irqrestore(&fs_info->eb_leak_lock, flags); in btrfs_leak_debug_add_eb()
53 struct btrfs_fs_info *fs_info = eb->fs_info; in btrfs_leak_debug_del_eb() local
56 spin_lock_irqsave(&fs_info->eb_leak_lock, flags); in btrfs_leak_debug_del_eb()
58 spin_unlock_irqrestore(&fs_info->eb_leak_lock, flags); in btrfs_leak_debug_del_eb()
61 void btrfs_extent_buffer_leak_debug_check(struct btrfs_fs_info *fs_info) in btrfs_extent_buffer_leak_debug_check() argument
70 if (!fs_info->allocated_ebs.next) in btrfs_extent_buffer_leak_debug_check()
73 WARN_ON(!list_empty(&fs_info->allocated_ebs)); in btrfs_extent_buffer_leak_debug_check()
[all …]
H A Dfile-item.c92 ASSERT(IS_ALIGNED(start + len, inode->root->fs_info->sectorsize)); in btrfs_inode_set_file_extent_range()
121 ASSERT(IS_ALIGNED(start + len, inode->root->fs_info->sectorsize) || in btrfs_inode_clear_file_extent_range()
128 static size_t bytes_to_csum_size(const struct btrfs_fs_info *fs_info, u32 bytes) in bytes_to_csum_size() argument
130 ASSERT(IS_ALIGNED(bytes, fs_info->sectorsize)); in bytes_to_csum_size()
132 return (bytes >> fs_info->sectorsize_bits) * fs_info->csum_size; in bytes_to_csum_size()
135 static size_t csum_size_to_bytes(const struct btrfs_fs_info *fs_info, u32 csum_size) in csum_size_to_bytes() argument
137 ASSERT(IS_ALIGNED(csum_size, fs_info->csum_size)); in csum_size_to_bytes()
139 return (csum_size / fs_info->csum_size) << fs_info in csum_size_to_bytes()
142 max_ordered_sum_bytes(const struct btrfs_fs_info * fs_info) max_ordered_sum_bytes() argument
154 btrfs_ordered_sum_size(const struct btrfs_fs_info * fs_info,unsigned long bytes) btrfs_ordered_sum_size() argument
204 struct btrfs_fs_info *fs_info = root->fs_info; btrfs_lookup_csum() local
277 search_csum_tree(struct btrfs_fs_info * fs_info,struct btrfs_path * path,u64 disk_bytenr,u64 len,u8 * dst) search_csum_tree() argument
342 struct btrfs_fs_info *fs_info = inode->root->fs_info; btrfs_lookup_bio_sums() local
465 struct btrfs_fs_info *fs_info = root->fs_info; btrfs_lookup_csums_list() local
610 struct btrfs_fs_info *fs_info = root->fs_info; btrfs_lookup_csums_bitmap() local
742 struct btrfs_fs_info *fs_info = inode->root->fs_info; btrfs_csum_one_bio() local
825 struct btrfs_fs_info *fs_info = trans->fs_info; truncate_one_csum() local
873 struct btrfs_fs_info *fs_info = trans->fs_info; btrfs_del_csums() local
1048 struct btrfs_fs_info *fs_info = root->fs_info; btrfs_csum_file_blocks() local
1270 struct btrfs_fs_info *fs_info = inode->root->fs_info; btrfs_extent_item_to_extent_map() local
[all...]
H A Dbio.c44 void btrfs_bio_init(struct btrfs_bio *bbio, struct btrfs_fs_info *fs_info, in btrfs_bio_init() argument
48 bbio->fs_info = fs_info; in btrfs_bio_init()
63 struct btrfs_fs_info *fs_info, in btrfs_bio_alloc() argument
71 btrfs_bio_init(bbio, fs_info, end_io, private); in btrfs_bio_alloc()
75 static struct btrfs_bio *btrfs_split_bio(struct btrfs_fs_info *fs_info, in btrfs_split_bio() argument
88 btrfs_bio_init(bbio, fs_info, NULL, orig_bbio); in btrfs_split_bio()
164 struct btrfs_fs_info *fs_info = inode->root->fs_info; in btrfs_end_repair_bio() local
175 btrfs_debug(fs_info, "n in btrfs_end_repair_bio()
210 struct btrfs_fs_info *fs_info = inode->root->fs_info; repair_one_sector() local
256 struct btrfs_fs_info *fs_info = inode->root->fs_info; btrfs_check_read_bio() local
313 btrfs_end_io_wq(const struct btrfs_fs_info * fs_info,const struct bio * bio) btrfs_end_io_wq() argument
336 struct btrfs_fs_info *fs_info = bbio->fs_info; btrfs_simple_end_io() local
624 struct btrfs_fs_info *fs_info = bbio->fs_info; btrfs_wq_submit_bio() local
663 struct btrfs_fs_info *fs_info = bbio->fs_info; btrfs_submit_chunk() local
802 btrfs_repair_io_failure(struct btrfs_fs_info * fs_info,u64 ino,u64 start,u64 length,u64 logical,phys_addr_t paddr,int mirror_num) btrfs_repair_io_failure() argument
862 struct btrfs_fs_info *fs_info = bbio->fs_info; btrfs_submit_repair_write() local
[all...]
H A Ddelayed-ref.c31 bool btrfs_check_space_for_delayed_refs(struct btrfs_fs_info *fs_info) in btrfs_check_space_for_delayed_refs() argument
33 struct btrfs_block_rsv *delayed_refs_rsv = &fs_info->delayed_refs_rsv; in btrfs_check_space_for_delayed_refs()
34 struct btrfs_block_rsv *global_rsv = &fs_info->global_block_rsv; in btrfs_check_space_for_delayed_refs()
59 * @fs_info: the filesystem
66 void btrfs_delayed_refs_rsv_release(struct btrfs_fs_info *fs_info, int nr_refs, int nr_csums) in btrfs_delayed_refs_rsv_release() argument
68 struct btrfs_block_rsv *block_rsv = &fs_info->delayed_refs_rsv; in btrfs_delayed_refs_rsv_release()
72 num_bytes = btrfs_calc_delayed_ref_bytes(fs_info, nr_refs); in btrfs_delayed_refs_rsv_release()
73 num_bytes += btrfs_calc_delayed_ref_csum_bytes(fs_info, nr_csums); in btrfs_delayed_refs_rsv_release()
75 released = btrfs_block_rsv_release(fs_info, block_rsv, num_bytes, NULL); in btrfs_delayed_refs_rsv_release()
77 trace_btrfs_space_reservation(fs_info, "delayed_refs_rs in btrfs_delayed_refs_rsv_release()
90 struct btrfs_fs_info *fs_info = trans->fs_info; btrfs_update_delayed_refs_rsv() local
135 btrfs_inc_delayed_refs_rsv_bg_inserts(struct btrfs_fs_info * fs_info) btrfs_inc_delayed_refs_rsv_bg_inserts() argument
154 btrfs_dec_delayed_refs_rsv_bg_inserts(struct btrfs_fs_info * fs_info) btrfs_dec_delayed_refs_rsv_bg_inserts() argument
170 btrfs_inc_delayed_refs_rsv_bg_updates(struct btrfs_fs_info * fs_info) btrfs_inc_delayed_refs_rsv_bg_updates() argument
189 btrfs_dec_delayed_refs_rsv_bg_updates(struct btrfs_fs_info * fs_info) btrfs_dec_delayed_refs_rsv_bg_updates() argument
210 btrfs_delayed_refs_rsv_refill(struct btrfs_fs_info * fs_info,enum btrfs_reserve_flush_enum flush) btrfs_delayed_refs_rsv_refill() argument
370 drop_delayed_ref(struct btrfs_fs_info * fs_info,struct btrfs_delayed_ref_root * delayed_refs,struct btrfs_delayed_ref_head * head,struct btrfs_delayed_ref_node * ref) drop_delayed_ref() argument
384 merge_ref(struct btrfs_fs_info * fs_info,struct btrfs_delayed_ref_root * delayed_refs,struct btrfs_delayed_ref_head * head,struct btrfs_delayed_ref_node * ref,u64 seq) merge_ref() argument
431 btrfs_merge_delayed_refs(struct btrfs_fs_info * fs_info,struct btrfs_delayed_ref_root * delayed_refs,struct btrfs_delayed_ref_head * head) btrfs_merge_delayed_refs() argument
460 btrfs_check_delayed_seq(struct btrfs_fs_info * fs_info,u64 seq) btrfs_check_delayed_seq() argument
476 btrfs_select_ref_head(const struct btrfs_fs_info * fs_info,struct btrfs_delayed_ref_root * delayed_refs) btrfs_select_ref_head() argument
533 btrfs_delete_ref_head(const struct btrfs_fs_info * fs_info,struct btrfs_delayed_ref_root * delayed_refs,struct btrfs_delayed_ref_head * head) btrfs_delete_ref_head() argument
640 struct btrfs_fs_info *fs_info = trans->fs_info; update_existing_head_ref() local
813 struct btrfs_fs_info *fs_info = trans->fs_info; add_delayed_ref_head() local
921 init_delayed_ref_common(struct btrfs_fs_info * fs_info,struct btrfs_delayed_ref_node * ref,struct btrfs_ref * generic_ref) init_delayed_ref_common() argument
991 struct btrfs_fs_info *fs_info = trans->fs_info; add_delayed_ref() local
1172 btrfs_find_delayed_ref_head(const struct btrfs_fs_info * fs_info,struct btrfs_delayed_ref_root * delayed_refs,u64 bytenr) btrfs_find_delayed_ref_head() argument
1253 struct btrfs_fs_info *fs_info = trans->fs_info; btrfs_destroy_delayed_refs() local
[all...]
H A Dtree-checker.c59 const struct btrfs_fs_info *fs_info = eb->fs_info; in generic_err() local
69 btrfs_crit(fs_info, in generic_err()
85 const struct btrfs_fs_info *fs_info = eb->fs_info; in file_extent_err() local
97 btrfs_crit(fs_info, in file_extent_err()
129 end = ALIGN(key->offset + len, leaf->fs_info->sectorsize); in file_extent_end()
146 const struct btrfs_fs_info *fs_info = eb->fs_info; in dir_item_err() local
158 btrfs_crit(fs_info, in dir_item_err()
210 struct btrfs_fs_info *fs_info = leaf->fs_info; check_extent_data_item() local
367 struct btrfs_fs_info *fs_info = leaf->fs_info; check_csum_item() local
524 struct btrfs_fs_info *fs_info = leaf->fs_info; check_dir_item() local
661 const struct btrfs_fs_info *fs_info = eb->fs_info; block_group_err() local
684 struct btrfs_fs_info *fs_info = leaf->fs_info; check_block_group_item() local
769 chunk_err(const struct btrfs_fs_info * fs_info,const struct extent_buffer * leaf,const struct btrfs_chunk * chunk,u64 logical,const char * fmt,...) chunk_err() argument
818 btrfs_check_chunk_valid(const struct btrfs_fs_info * fs_info,const struct extent_buffer * leaf,const struct btrfs_chunk * chunk,u64 logical,u32 sectorsize) btrfs_check_chunk_valid() argument
996 struct btrfs_fs_info *fs_info = leaf->fs_info; check_leaf_chunk_item() local
1100 struct btrfs_fs_info *fs_info = leaf->fs_info; check_inode_item() local
1189 struct btrfs_fs_info *fs_info = leaf->fs_info; check_root_item() local
1322 struct btrfs_fs_info *fs_info = leaf->fs_info; check_extent_item() local
1939 struct btrfs_fs_info *fs_info = leaf->fs_info; __btrfs_check_leaf() local
2101 struct btrfs_fs_info *fs_info = node->fs_info; __btrfs_check_node() local
2226 struct btrfs_fs_info *fs_info = eb->fs_info; btrfs_verify_level_key() local
[all...]
H A Dextent-tree.c70 int btrfs_lookup_data_extent(struct btrfs_fs_info *fs_info, u64 start, u64 len) in btrfs_lookup_data_extent() argument
72 struct btrfs_root *root = btrfs_extent_root(fs_info, start); in btrfs_lookup_data_extent()
96 struct btrfs_fs_info *fs_info, u64 bytenr, in btrfs_lookup_extent_info() argument
114 if (metadata && !btrfs_fs_incompat(fs_info, SKINNY_METADATA)) { in btrfs_lookup_extent_info()
115 offset = fs_info->nodesize; in btrfs_lookup_extent_info()
131 extent_root = btrfs_extent_root(fs_info, bytenr); in btrfs_lookup_extent_info()
143 key.offset == fs_info->nodesize) in btrfs_lookup_extent_info()
155 btrfs_err(fs_info, in btrfs_lookup_extent_info()
166 btrfs_err(fs_info, in btrfs_lookup_extent_info()
173 owner = btrfs_get_extent_owner_root(fs_info, lea in btrfs_lookup_extent_info()
335 struct btrfs_fs_info *fs_info = eb->fs_info; btrfs_get_extent_inline_ref_type() local
767 struct btrfs_fs_info *fs_info = trans->fs_info; lookup_inline_extent_backref() local
1087 struct btrfs_fs_info *fs_info = leaf->fs_info; update_inline_extent_backref() local
1344 struct btrfs_fs_info *fs_info = dev->fs_info; do_discard_extent() local
1381 btrfs_discard_extent(struct btrfs_fs_info * fs_info,u64 bytenr,u64 num_bytes,u64 * actual_bytes) btrfs_discard_extent() argument
1449 struct btrfs_fs_info *fs_info = trans->fs_info; btrfs_inc_extent_ref() local
1538 free_head_ref_squota_rsv(struct btrfs_fs_info * fs_info,const struct btrfs_delayed_ref_head * href) free_head_ref_squota_rsv() argument
1628 struct btrfs_fs_info *fs_info = trans->fs_info; run_delayed_extent_op() local
1717 struct btrfs_fs_info *fs_info = trans->fs_info; run_delayed_tree_ref() local
1827 btrfs_cleanup_ref_head_accounting(struct btrfs_fs_info * fs_info,struct btrfs_delayed_ref_root * delayed_refs,struct btrfs_delayed_ref_head * head) btrfs_cleanup_ref_head_accounting() argument
1861 struct btrfs_fs_info *fs_info = trans->fs_info; cleanup_ref_head() local
1915 struct btrfs_fs_info *fs_info = trans->fs_info; btrfs_run_delayed_refs_for_head() local
2001 struct btrfs_fs_info *fs_info = trans->fs_info; __btrfs_run_delayed_refs() local
2143 struct btrfs_fs_info *fs_info = trans->fs_info; btrfs_run_delayed_refs() local
2339 struct btrfs_fs_info *fs_info = root->fs_info; check_committed_ref() local
2462 struct btrfs_fs_info *fs_info = root->fs_info; __btrfs_mod_ref() local
2559 struct btrfs_fs_info *fs_info = root->fs_info; get_alloc_profile_by_root() local
2574 first_logical_byte(struct btrfs_fs_info * fs_info) first_logical_byte() argument
2654 __exclude_logged_extent(struct btrfs_fs_info * fs_info,u64 start,u64 num_bytes) __exclude_logged_extent() argument
2676 struct btrfs_fs_info *fs_info = eb->fs_info; btrfs_exclude_logged_extents() local
2717 fetch_cluster_info(struct btrfs_fs_info * fs_info,struct btrfs_space_info * space_info,u64 * empty_cluster) fetch_cluster_info() argument
2741 unpin_extent_range(struct btrfs_fs_info * fs_info,u64 start,u64 end,const bool return_free_space) unpin_extent_range() argument
2825 struct btrfs_fs_info *fs_info = trans->fs_info; btrfs_finish_extent_commit() local
2940 btrfs_get_extent_owner_root(struct btrfs_fs_info * fs_info,struct extent_buffer * leaf,int slot) btrfs_get_extent_owner_root() argument
3390 struct btrfs_fs_info *fs_info = trans->fs_info; check_ref_cleanup() local
3442 struct btrfs_fs_info *fs_info = trans->fs_info; btrfs_free_tree_block() local
3529 struct btrfs_fs_info *fs_info = trans->fs_info; btrfs_free_extent() local
3853 struct btrfs_fs_info *fs_info = block_group->fs_info; do_allocation_zoned() local
4082 can_allocate_chunk_zoned(struct btrfs_fs_info * fs_info,struct find_free_extent_ctl * ffe_ctl) can_allocate_chunk_zoned() argument
4135 can_allocate_chunk(struct btrfs_fs_info * fs_info,struct find_free_extent_ctl * ffe_ctl) can_allocate_chunk() argument
4153 find_free_extent_update_loop(struct btrfs_fs_info * fs_info,struct btrfs_key * ins,struct find_free_extent_ctl * ffe_ctl,struct btrfs_space_info * space_info,bool full_search) find_free_extent_update_loop() argument
4248 prepare_allocation_clustered(struct btrfs_fs_info * fs_info,struct find_free_extent_ctl * ffe_ctl,struct btrfs_space_info * space_info,struct btrfs_key * ins) prepare_allocation_clustered() argument
4299 prepare_allocation_zoned(struct btrfs_fs_info * fs_info,struct find_free_extent_ctl * ffe_ctl) prepare_allocation_zoned() argument
4335 prepare_allocation(struct btrfs_fs_info * fs_info,struct find_free_extent_ctl * ffe_ctl,struct btrfs_space_info * space_info,struct btrfs_key * ins) prepare_allocation() argument
4380 struct btrfs_fs_info *fs_info = root->fs_info; find_free_extent() local
4693 struct btrfs_fs_info *fs_info = root->fs_info; btrfs_reserve_extent() local
4744 btrfs_free_reserved_extent(struct btrfs_fs_info * fs_info,u64 start,u64 len,bool is_delalloc) btrfs_free_reserved_extent() argument
4785 struct btrfs_fs_info *fs_info = trans->fs_info; alloc_reserved_extent() local
4809 struct btrfs_fs_info *fs_info = trans->fs_info; alloc_reserved_file_extent() local
4882 struct btrfs_fs_info *fs_info = trans->fs_info; alloc_reserved_tree_block() local
4985 struct btrfs_fs_info *fs_info = trans->fs_info; btrfs_alloc_logged_file_extent() local
5056 struct btrfs_fs_info *fs_info = root->fs_info; btrfs_init_new_buffer() local
5144 struct btrfs_fs_info *fs_info = root->fs_info; btrfs_alloc_tree_block() local
5349 struct btrfs_fs_info *fs_info = root->fs_info; reada_walk_down() local
5427 struct btrfs_fs_info *fs_info = root->fs_info; walk_down_proc() local
5709 struct btrfs_fs_info *fs_info = root->fs_info; do_walk_down() local
5820 struct btrfs_fs_info *fs_info = root->fs_info; walk_up_proc() local
6057 struct btrfs_fs_info *fs_info = root->fs_info; btrfs_drop_snapshot() local
6333 struct btrfs_fs_info *fs_info = root->fs_info; btrfs_drop_subtree() local
6392 btrfs_error_unpin_extent_range(struct btrfs_fs_info * fs_info,u64 start,u64 end) btrfs_error_unpin_extent_range() argument
6439 struct btrfs_fs_info *fs_info = device->fs_info; btrfs_trim_free_extents() local
6515 btrfs_trim_fs(struct btrfs_fs_info * fs_info,struct fstrim_range * range) btrfs_trim_fs() argument
[all...]
H A Ddev-replace.h19 int btrfs_init_dev_replace(struct btrfs_fs_info *fs_info);
21 int btrfs_dev_replace_by_ioctl(struct btrfs_fs_info *fs_info,
23 void btrfs_dev_replace_status(struct btrfs_fs_info *fs_info,
25 int btrfs_dev_replace_cancel(struct btrfs_fs_info *fs_info);
26 void btrfs_dev_replace_suspend_for_unmount(struct btrfs_fs_info *fs_info);
27 int btrfs_resume_dev_replace_async(struct btrfs_fs_info *fs_info);
32 void btrfs_bio_counter_inc_blocked(struct btrfs_fs_info *fs_info);
33 void btrfs_bio_counter_sub(struct btrfs_fs_info *fs_info, s64 amount);
35 static inline void btrfs_bio_counter_dec(struct btrfs_fs_info *fs_info) in btrfs_bio_counter_dec() argument
37 btrfs_bio_counter_sub(fs_info, in btrfs_bio_counter_dec()
[all...]
/linux/fs/btrfs/tests/
H A Dbtrfs-tests.c24 [TEST_ALLOC_FS_INFO] = "cannot allocate fs_info",
97 struct btrfs_device *btrfs_alloc_dummy_device(struct btrfs_fs_info *fs_info) in btrfs_alloc_dummy_device() argument
105 btrfs_extent_io_tree_init(fs_info, &dev->alloc_state, 0); in btrfs_alloc_dummy_device()
107 list_add(&dev->dev_list, &fs_info->fs_devices->devices); in btrfs_alloc_dummy_device()
120 struct btrfs_fs_info *fs_info = kzalloc(sizeof(struct btrfs_fs_info), in btrfs_alloc_dummy_fs_info() local
123 if (!fs_info) in btrfs_alloc_dummy_fs_info()
124 return fs_info; in btrfs_alloc_dummy_fs_info()
125 fs_info->fs_devices = kzalloc(sizeof(struct btrfs_fs_devices), in btrfs_alloc_dummy_fs_info()
127 if (!fs_info->fs_devices) { in btrfs_alloc_dummy_fs_info()
128 kfree(fs_info); in btrfs_alloc_dummy_fs_info()
158 btrfs_free_dummy_fs_info(struct btrfs_fs_info * fs_info) btrfs_free_dummy_fs_info() argument
206 btrfs_alloc_dummy_block_group(struct btrfs_fs_info * fs_info,unsigned long length) btrfs_alloc_dummy_block_group() argument
244 btrfs_init_dummy_transaction(struct btrfs_transaction * trans,struct btrfs_fs_info * fs_info) btrfs_init_dummy_transaction() argument
254 btrfs_init_dummy_trans(struct btrfs_trans_handle * trans,struct btrfs_fs_info * fs_info) btrfs_init_dummy_trans() argument
[all...]
H A Draid-stripe-tree-tests.c40 struct btrfs_fs_info *fs_info = trans->fs_info; in test_punch_hole_3extents() local
54 bioc = alloc_btrfs_io_context(fs_info, logical1, RST_TEST_NUM_DEVICES); in test_punch_hole_3extents()
61 io_stripe.dev = btrfs_device_by_devid(fs_info->fs_devices, 0); in test_punch_hole_3extents()
70 stripe->dev = btrfs_device_by_devid(fs_info->fs_devices, i); in test_punch_hole_3extents()
91 stripe->dev = btrfs_device_by_devid(fs_info->fs_devices, i); in test_punch_hole_3extents()
112 stripe->dev = btrfs_device_by_devid(fs_info->fs_devices, i); in test_punch_hole_3extents()
141 ret = btrfs_get_raid_extent_offset(fs_info, logical1, &len1, map_type, in test_punch_hole_3extents()
164 ret = btrfs_get_raid_extent_offset(fs_info, logical2, &len2, map_type, in test_punch_hole_3extents()
175 ret = btrfs_get_raid_extent_offset(fs_info, logical in test_punch_hole_3extents()
218 struct btrfs_fs_info *fs_info = trans->fs_info; test_delete_two_extents() local
362 struct btrfs_fs_info *fs_info = trans->fs_info; test_punch_hole() local
505 struct btrfs_fs_info *fs_info = trans->fs_info; test_front_delete_prev_item() local
647 struct btrfs_fs_info *fs_info = trans->fs_info; test_front_delete() local
756 struct btrfs_fs_info *fs_info = trans->fs_info; test_tail_delete() local
878 struct btrfs_fs_info *fs_info = trans->fs_info; test_create_update_delete() local
999 struct btrfs_fs_info *fs_info = trans->fs_info; test_simple_create_delete() local
1087 struct btrfs_fs_info *fs_info; run_test() local
[all...]

12345