| /linux-6.15/fs/bcachefs/ |
| H A D | super.h | 13 struct bch_fs *bch2_dev_to_fs(dev_t); 14 struct bch_fs *bch2_uuid_to_fs(__uuid_t); 25 int bch2_dev_add(struct bch_fs *, const char *); 31 bool bch2_fs_emergency_read_only(struct bch_fs *); 33 void bch2_fs_read_only(struct bch_fs *); 35 int bch2_fs_read_write(struct bch_fs *); 36 int bch2_fs_read_write_early(struct bch_fs *); 38 void __bch2_fs_stop(struct bch_fs *); 39 void bch2_fs_free(struct bch_fs *); 40 void bch2_fs_stop(struct bch_fs *); [all …]
|
| H A D | alloc_foreground.h | 14 struct bch_fs; 19 void bch2_reset_alloc_cursors(struct bch_fs *); 26 struct dev_alloc_list bch2_dev_alloc_list(struct bch_fs *, 57 static inline void ob_push(struct bch_fs *c, struct open_buckets *obs, in ob_push() 71 static inline struct open_bucket *ec_open_bucket(struct bch_fs *c, in ec_open_bucket() 84 void bch2_open_bucket_write_error(struct bch_fs *, 87 void __bch2_open_bucket_put(struct bch_fs *, struct open_bucket *); 95 static inline void bch2_open_buckets_put(struct bch_fs *c, in bch2_open_buckets_put() 123 static inline void bch2_open_bucket_get(struct bch_fs *c, in bch2_open_bucket_get() 241 void bch2_fs_allocator_foreground_init(struct bch_fs *); [all …]
|
| H A D | snapshot.h | 6 int bch2_snapshot_tree_validate(struct bch_fs *, struct bkey_s_c, 20 int bch2_snapshot_validate(struct bch_fs *, struct bkey_s_c, 47 static inline u32 bch2_snapshot_tree(struct bch_fs *c, u32 id) in bch2_snapshot_tree() 108 u32 bch2_snapshot_tree_oldest_subvol(struct bch_fs *, u32); 109 u32 bch2_snapshot_skiplist_get(struct bch_fs *, u32); 167 bool __bch2_snapshot_is_ancestor(struct bch_fs *, u32, u32); 241 int bch2_check_snapshot_trees(struct bch_fs *); 242 int bch2_check_snapshots(struct bch_fs *); 243 int bch2_reconstruct_snapshots(struct bch_fs *); 262 int bch2_snapshots_read(struct bch_fs *); [all …]
|
| H A D | fsck.h | 13 int bch2_check_inodes(struct bch_fs *); 14 int bch2_check_extents(struct bch_fs *); 15 int bch2_check_indirect_extents(struct bch_fs *); 16 int bch2_check_dirents(struct bch_fs *); 17 int bch2_check_xattrs(struct bch_fs *); 18 int bch2_check_root(struct bch_fs *); 19 int bch2_check_subvolume_structure(struct bch_fs *); 20 int bch2_check_unreachable_inodes(struct bch_fs *); 21 int bch2_check_directory_structure(struct bch_fs *); 22 int bch2_check_nlinks(struct bch_fs *); [all …]
|
| H A D | quota.h | 10 int bch2_quota_validate(struct bch_fs *, struct bkey_s_c, 12 void bch2_quota_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c); 29 static inline unsigned enabled_qtypes(struct bch_fs *c) in enabled_qtypes() 41 int bch2_quota_transfer(struct bch_fs *, unsigned, struct bch_qid, 44 void bch2_fs_quota_exit(struct bch_fs *); 45 void bch2_fs_quota_init(struct bch_fs *); 46 int bch2_fs_quota_read(struct bch_fs *); 52 static inline int bch2_quota_acct(struct bch_fs *c, struct bch_qid qid, in bch2_quota_acct() 67 static inline void bch2_fs_quota_exit(struct bch_fs *c) {} in bch2_fs_quota_exit() 68 static inline void bch2_fs_quota_init(struct bch_fs *c) {} in bch2_fs_quota_init() [all …]
|
| H A D | error.h | 11 struct bch_fs; 21 void bch2_log_msg_start(struct bch_fs *, struct printbuf *); 35 bool bch2_inconsistent_error(struct bch_fs *); 79 void __bch2_count_fsck_err(struct bch_fs *, 86 int __bch2_fsck_err(struct bch_fs *, struct btree_trans *, 91 __bch2_fsck_err(type_is(c, struct bch_fs *) ? (struct bch_fs *) c : NULL,\ 95 void bch2_flush_fsck_errs(struct bch_fs *); 96 void bch2_free_fsck_errs(struct bch_fs *); 120 if (type_is(c, struct bch_fs *)) \ 151 int __bch2_bkey_fsck_err(struct bch_fs *, [all …]
|
| H A D | btree_journal_iter.h | 54 struct bkey_i *bch2_journal_keys_peek_max(struct bch_fs *, enum btree_id, 58 struct bkey_i *bch2_journal_keys_peek_slot(struct bch_fs *, enum btree_id, 64 int bch2_journal_key_insert_take(struct bch_fs *, enum btree_id, 66 int bch2_journal_key_insert(struct bch_fs *, enum btree_id, 68 int bch2_journal_key_delete(struct bch_fs *, enum btree_id, 83 void bch2_journal_keys_put(struct bch_fs *); 85 static inline void bch2_journal_keys_put_initial(struct bch_fs *c) in bch2_journal_keys_put_initial() 92 int bch2_journal_keys_sort(struct bch_fs *); 94 void bch2_shoot_down_journal_keys(struct bch_fs *, enum btree_id, 98 void bch2_journal_keys_dump(struct bch_fs *); [all …]
|
| H A D | replicas.h | 13 struct bch_fs *, struct printbuf *); 22 int bch2_replicas_entry_idx(struct bch_fs *, 29 bool bch2_replicas_marked_locked(struct bch_fs *, 32 int bch2_mark_replicas(struct bch_fs *, 46 bool bch2_have_enough_devs(struct bch_fs *, struct bch_devs_mask, 50 unsigned bch2_dev_has_data(struct bch_fs *, struct bch_dev *); 52 int bch2_replicas_gc_end(struct bch_fs *, int); 53 int bch2_replicas_gc_start(struct bch_fs *, unsigned); 54 int bch2_replicas_gc2(struct bch_fs *); 76 int bch2_sb_replicas_to_cpu_replicas(struct bch_fs *); [all …]
|
| H A D | btree_cache.h | 13 void bch2_recalc_btree_reserve(struct bch_fs *); 15 void bch2_btree_node_to_freelist(struct bch_fs *, struct btree *); 24 void bch2_node_pin(struct bch_fs *, struct btree *); 25 void bch2_btree_cache_unpin(struct bch_fs *); 33 struct btree *__bch2_btree_node_mem_alloc(struct bch_fs *); 48 void bch2_fs_btree_cache_exit(struct bch_fs *); 49 int bch2_fs_btree_cache_init(struct bch_fs *); 97 static inline size_t btree_max_u64s(const struct bch_fs *c) in btree_max_u64s() 102 static inline size_t btree_sectors(const struct bch_fs *c) in btree_sectors() 107 static inline unsigned btree_blocks(const struct bch_fs *c) in btree_blocks() [all …]
|
| H A D | rebalance.h | 10 static inline struct bch_extent_rebalance io_opts_to_rebalance_opts(struct bch_fs *c, in io_opts_to_rebalance_opts() 29 u64 bch2_bkey_sectors_need_rebalance(struct bch_fs *, struct bkey_s_c); 30 int bch2_bkey_set_needs_rebalance(struct bch_fs *, struct bch_io_opts *, struct bkey_i *); 37 int bch2_set_rebalance_needs_scan(struct bch_fs *, u64 inum); 38 int bch2_set_fs_needs_rebalance(struct bch_fs *); 40 static inline void bch2_rebalance_wakeup(struct bch_fs *c) in bch2_rebalance_wakeup() 51 void bch2_rebalance_status_to_text(struct printbuf *, struct bch_fs *); 53 void bch2_rebalance_stop(struct bch_fs *); 54 int bch2_rebalance_start(struct bch_fs *); 55 void bch2_fs_rebalance_init(struct bch_fs *);
|
| H A D | disk_groups.h | 59 const struct bch_devs_mask *bch2_target_to_mask(struct bch_fs *, unsigned); 61 static inline struct bch_devs_mask target_rw_devs(struct bch_fs *c, in target_rw_devs() 73 static inline bool bch2_target_accepts_data(struct bch_fs *c, in bch2_target_accepts_data() 81 bool bch2_dev_in_target(struct bch_fs *, unsigned, unsigned); 88 void bch2_disk_path_to_text(struct printbuf *, struct bch_fs *, unsigned); 91 void bch2_target_to_text(struct printbuf *out, struct bch_fs *, unsigned); 93 int bch2_opt_target_parse(struct bch_fs *, const char *, u64 *, struct printbuf *); 101 int bch2_sb_disk_groups_to_cpu(struct bch_fs *); 103 int __bch2_dev_group_set(struct bch_fs *, struct bch_dev *, const char *); 104 int bch2_dev_group_set(struct bch_fs *, struct bch_dev *, const char *); [all …]
|
| H A D | ec.h | 9 int bch2_stripe_validate(struct bch_fs *, struct bkey_s_c, 11 void bch2_stripe_to_text(struct printbuf *, struct bch_fs *, 195 struct bch_fs *c; 262 void bch2_do_stripe_deletes(struct bch_fs *); 263 void bch2_ec_do_stripe_creates(struct bch_fs *); 293 void bch2_fs_ec_stop(struct bch_fs *); 294 void bch2_fs_ec_flush(struct bch_fs *); 296 int bch2_stripes_read(struct bch_fs *); 300 void bch2_fs_ec_exit(struct bch_fs *); 301 void bch2_fs_ec_init_early(struct bch_fs *); [all …]
|
| H A D | debug.h | 9 struct bch_fs; 11 void __bch2_btree_verify(struct bch_fs *, struct btree *); 12 void bch2_btree_node_ondisk_to_text(struct printbuf *, struct bch_fs *, 15 static inline void bch2_btree_verify(struct bch_fs *c, struct btree *b) in bch2_btree_verify() 22 void bch2_fs_debug_exit(struct bch_fs *); 23 void bch2_fs_debug_init(struct bch_fs *); 25 static inline void bch2_fs_debug_exit(struct bch_fs *c) {} in bch2_fs_debug_exit() 26 static inline void bch2_fs_debug_init(struct bch_fs *c) {} in bch2_fs_debug_init()
|
| H A D | btree_write_buffer.h | 8 static inline bool bch2_btree_write_buffer_should_flush(struct bch_fs *c) in bch2_btree_write_buffer_should_flush() 15 static inline bool bch2_btree_write_buffer_must_wait(struct bch_fs *c) in bch2_btree_write_buffer_must_wait() 24 bool bch2_btree_write_buffer_flush_going_ro(struct bch_fs *); 45 int bch2_accounting_key_to_wb_slowpath(struct bch_fs *, 48 static inline int bch2_accounting_key_to_wb(struct bch_fs *c, in bch2_accounting_key_to_wb() 68 int bch2_journal_key_to_wb_slowpath(struct bch_fs *, 72 static inline int __bch2_journal_key_to_wb(struct bch_fs *c, in __bch2_journal_key_to_wb() 88 static inline int bch2_journal_key_to_wb(struct bch_fs *c, in bch2_journal_key_to_wb() 102 int bch2_btree_write_buffer_resize(struct bch_fs *, size_t); 103 void bch2_fs_btree_write_buffer_exit(struct bch_fs *); [all …]
|
| H A D | super-io.h | 24 int bch2_set_version_incompat(struct bch_fs *, enum bcachefs_metadata_version); 26 static inline int bch2_request_incompat_feature(struct bch_fs *c, in bch2_request_incompat_feature() 71 static inline __le64 bch2_sb_magic(struct bch_fs *c) in bch2_sb_magic() 79 static inline __u64 jset_magic(struct bch_fs *c) in jset_magic() 84 static inline __u64 bset_magic(struct bch_fs *c) in bset_magic() 89 int bch2_sb_to_fs(struct bch_fs *, struct bch_sb *); 90 int bch2_sb_from_fs(struct bch_fs *, struct bch_dev *); 99 int bch2_write_super(struct bch_fs *); 100 void __bch2_check_set_feature(struct bch_fs *, unsigned); 108 bool bch2_check_version_downgrade(struct bch_fs *); [all …]
|
| H A D | alloc_background.h | 246 int bch2_alloc_v1_validate(struct bch_fs *, struct bkey_s_c, 295 int bch2_bucket_gens_init(struct bch_fs *); 304 int bch2_alloc_read(struct bch_fs *); 314 int bch2_check_alloc_info(struct bch_fs *); 315 int bch2_check_alloc_to_lru_refs(struct bch_fs *); 317 void bch2_do_discards(struct bch_fs *); 332 void bch2_do_invalidates(struct bch_fs *); 347 int bch2_fs_freespace_init(struct bch_fs *); 350 void bch2_recalc_capacity(struct bch_fs *); 351 u64 bch2_min_rw_member_capacity(struct bch_fs *); [all …]
|
| H A D | fs-io.h | 63 static inline void __bch2_quota_reservation_put(struct bch_fs *c, in __bch2_quota_reservation_put() 75 static inline void bch2_quota_reservation_put(struct bch_fs *c, in bch2_quota_reservation_put() 86 static inline int bch2_quota_reservation_add(struct bch_fs *c, in bch2_quota_reservation_add() 111 static inline void __bch2_quota_reservation_put(struct bch_fs *c, in __bch2_quota_reservation_put() 115 static inline void bch2_quota_reservation_put(struct bch_fs *c, in bch2_quota_reservation_put() 119 static inline int bch2_quota_reservation_add(struct bch_fs *c, in bch2_quota_reservation_add() 159 void bch2_inode_flush_nocow_writes_async(struct bch_fs *, 162 int __must_check bch2_write_inode_size(struct bch_fs *, 177 void bch2_fs_fsio_exit(struct bch_fs *); 178 int bch2_fs_fsio_init(struct bch_fs *); [all …]
|
| H A D | bkey_methods.h | 7 struct bch_fs; 24 int (*key_validate)(struct bch_fs *c, struct bkey_s_c k, 26 void (*val_to_text)(struct printbuf *, struct bch_fs *, 29 bool (*key_normalize)(struct bch_fs *, struct bkey_s); 30 bool (*key_merge)(struct bch_fs *, struct bkey_s, struct bkey_s_c); 51 int bch2_bkey_val_validate(struct bch_fs *, struct bkey_s_c, 53 int __bch2_bkey_validate(struct bch_fs *, struct bkey_s_c, 55 int bch2_bkey_validate(struct bch_fs *, struct bkey_s_c, 62 void bch2_val_to_text(struct printbuf *, struct bch_fs *, 64 void bch2_bkey_val_to_text(struct printbuf *, struct bch_fs *, [all …]
|
| H A D | reflink.h | 5 int bch2_reflink_p_validate(struct bch_fs *, struct bkey_s_c, 7 void bch2_reflink_p_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c); 8 bool bch2_reflink_p_merge(struct bch_fs *, struct bkey_s, struct bkey_s_c); 21 int bch2_reflink_v_validate(struct bch_fs *, struct bkey_s_c, 23 void bch2_reflink_v_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c); 36 int bch2_indirect_inline_data_validate(struct bch_fs *, struct bkey_s_c, 39 struct bch_fs *, struct bkey_s_c); 80 s64 bch2_remap_range(struct bch_fs *, subvol_inum, u64, 84 int bch2_gc_reflink_done(struct bch_fs *); 85 int bch2_gc_reflink_start(struct bch_fs *);
|
| H A D | sb-members.h | 16 int bch2_sb_members_v2_init(struct bch_fs *c); 26 static inline struct bch_dev *bch2_dev_rcu(struct bch_fs *, unsigned); 28 static inline bool bch2_dev_idx_is_online(struct bch_fs *c, unsigned dev) in bch2_dev_idx_is_online() 157 static inline struct bch_dev *bch2_get_next_online_dev(struct bch_fs *c, in bch2_get_next_online_dev() 188 static inline bool bch2_dev_exists(const struct bch_fs *c, unsigned dev) in bch2_dev_exists() 221 void bch2_dev_missing(struct bch_fs *, unsigned); 309 static inline struct bch_devs_mask bch2_online_devs(struct bch_fs *c) in bch2_online_devs() 360 void bch2_sb_members_from_cpu(struct bch_fs *); 380 bool bch2_dev_btree_bitmap_marked(struct bch_fs *, struct bkey_s_c); 381 void bch2_dev_btree_bitmap_mark(struct bch_fs *, struct bkey_s_c); [all …]
|
| H A D | checksum.h | 34 struct bch_csum bch2_checksum(struct bch_fs *, unsigned, struct nonce, 77 int bch2_encrypt(struct bch_fs *, unsigned, struct nonce, 80 struct bch_csum bch2_checksum_bio(struct bch_fs *, unsigned, 89 int __bch2_encrypt_bio(struct bch_fs *, unsigned, 92 static inline int bch2_encrypt_bio(struct bch_fs *c, unsigned type, in bch2_encrypt_bio() 106 int bch2_disable_encryption(struct bch_fs *); 107 int bch2_enable_encryption(struct bch_fs *, bool); 110 void bch2_fs_encryption_exit(struct bch_fs *); 111 int bch2_fs_encryption_init(struct bch_fs *); 152 static inline bool bch2_checksum_type_valid(const struct bch_fs *c, in bch2_checksum_type_valid() [all …]
|
| H A D | btree_io.h | 12 struct bch_fs; 18 static inline void set_btree_node_dirty_acct(struct bch_fs *c, struct btree *b) in set_btree_node_dirty_acct() 38 struct bch_fs *c; 71 bool bch2_compact_whiteouts(struct bch_fs *, struct btree *, 130 int bch2_btree_node_read_done(struct bch_fs *, struct bch_dev *, 133 int bch2_btree_root_read(struct bch_fs *, enum btree_id, 139 bool bch2_btree_post_write_cleanup(struct bch_fs *, struct btree *); 148 void __bch2_btree_node_write(struct bch_fs *, struct btree *, unsigned); 149 void bch2_btree_node_write(struct bch_fs *, struct btree *, 160 bool bch2_btree_flush_all_reads(struct bch_fs *); [all …]
|
| H A D | subvolume.h | 8 int bch2_check_subvols(struct bch_fs *); 9 int bch2_check_subvol_children(struct bch_fs *); 11 int bch2_subvolume_validate(struct bch_fs *, struct bkey_s_c, 13 void bch2_subvolume_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c); 33 int bch2_subvol_is_ro(struct bch_fs *, u32); 80 int bch2_delete_dead_snapshots(struct bch_fs *); 81 void bch2_delete_dead_snapshots_async(struct bch_fs *); 86 int bch2_initialize_subvolumes(struct bch_fs *); 87 int bch2_fs_upgrade_for_subvolumes(struct bch_fs *); 89 int bch2_fs_subvolumes_init(struct bch_fs *);
|
| H A D | btree_update_interior.h | 47 struct bch_fs *c; 178 void bch2_btree_node_rewrite_async(struct bch_fs *, struct btree *); 186 void bch2_btree_set_root_for_read(struct bch_fs *, struct btree *); 336 void bch2_btree_updates_to_text(struct printbuf *, struct bch_fs *); 338 bool bch2_btree_interior_updates_flush(struct bch_fs *); 344 void bch2_async_btree_node_rewrites_flush(struct bch_fs *); 345 void bch2_do_pending_node_rewrites(struct bch_fs *); 346 void bch2_free_pending_node_rewrites(struct bch_fs *); 350 void bch2_fs_btree_interior_update_exit(struct bch_fs *); 351 void bch2_fs_btree_interior_update_init_early(struct bch_fs *); [all …]
|
| H A D | sb-clean.h | 5 int bch2_sb_clean_validate_late(struct bch_fs *, struct bch_sb_field_clean *, int); 6 int bch2_verify_superblock_clean(struct bch_fs *, struct bch_sb_field_clean **, 8 struct bch_sb_field_clean *bch2_read_superblock_clean(struct bch_fs *); 9 void bch2_journal_super_entries_add_common(struct bch_fs *, struct jset_entry **, u64); 13 int bch2_fs_mark_dirty(struct bch_fs *); 14 void bch2_fs_mark_clean(struct bch_fs *);
|