/linux/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); 16 bool bch2_dev_state_allowed(struct bch_fs *, struct bch_dev *, 18 int __bch2_dev_set_state(struct bch_fs *, struct bch_dev *, 20 int bch2_dev_set_state(struct bch_fs *, struct bch_dev *, 24 int bch2_dev_remove(struct bch_fs *, struct bch_dev *, int); 25 int bch2_dev_add(struct bch_fs *, const char *); 26 int bch2_dev_online(struct bch_fs *, const char *); 27 int bch2_dev_offline(struct bch_fs *, struct bch_dev *, int); 28 int bch2_dev_resize(struct bch_fs *, struct bch_dev *, u64); [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 *, 31 static inline struct bch_dev *ob_dev(struct bch_fs *c, struct open_bucket *ob) in ob_dev() 36 struct open_bucket *bch2_bucket_alloc(struct bch_fs *, struct bch_dev *, 40 static inline void ob_push(struct bch_fs *c, struct open_buckets *obs, in ob_push() 54 static inline struct open_bucket *ec_open_bucket(struct bch_fs *c, in ec_open_bucket() 67 void bch2_open_bucket_write_error(struct bch_fs *, 70 void __bch2_open_bucket_put(struct bch_fs *, struct open_bucket *); 72 static inline void bch2_open_bucket_put(struct bch_fs *c, struct open_bucket *ob) in bch2_open_bucket_put() [all …]
|
H A D | snapshot.h | 5 void bch2_snapshot_tree_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c); 6 int bch2_snapshot_tree_validate(struct bch_fs *, struct bkey_s_c, 19 void bch2_snapshot_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c); 20 int bch2_snapshot_validate(struct bch_fs *, struct bkey_s_c, 42 static inline const struct snapshot_t *snapshot_t(struct bch_fs *c, u32 id) in snapshot_t() 47 static inline u32 bch2_snapshot_tree(struct bch_fs *c, u32 id) in bch2_snapshot_tree() 57 static inline u32 __bch2_snapshot_parent_early(struct bch_fs *c, u32 id) in __bch2_snapshot_parent_early() 63 static inline u32 bch2_snapshot_parent_early(struct bch_fs *c, u32 id) in bch2_snapshot_parent_early() 72 static inline u32 __bch2_snapshot_parent(struct bch_fs *c, u32 id) in __bch2_snapshot_parent() 89 static inline u32 bch2_snapshot_parent(struct bch_fs *c, u32 id) in bch2_snapshot_parent() [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 | 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 *, 157 struct bch_fs *c; 213 void *bch2_writepoint_ec_buf(struct bch_fs *, struct write_point *); 215 void bch2_ec_bucket_cancel(struct bch_fs *, struct open_bucket *); 217 int bch2_ec_stripe_new_alloc(struct bch_fs *, struct ec_stripe_head *); 219 void bch2_ec_stripe_head_put(struct bch_fs *, struct ec_stripe_head *); 224 void bch2_stripes_heap_update(struct bch_fs *, struct stripe *, size_t); 225 void bch2_stripes_heap_del(struct bch_fs *, struct stripe *, size_t); 226 void bch2_stripes_heap_insert(struct bch_fs *, struct stripe *, size_t); [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() 38 int bch2_quota_acct(struct bch_fs *, struct bch_qid, enum quota_counters, 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() 59 static inline int bch2_quota_transfer(struct bch_fs *c, unsigned qtypes, in bch2_quota_transfer() [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 | btree_journal_iter.h | 54 struct bkey_i *bch2_journal_keys_peek_max(struct bch_fs *, enum btree_id, 56 struct bkey_i *bch2_journal_keys_peek_prev_min(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, 71 void bch2_journal_key_overwritten(struct bch_fs *, enum btree_id, unsigned, struct bpos); 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 *); [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 *, 31 bool bch2_replicas_marked(struct bch_fs *, struct bch_replicas_entry_v1 *); 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 *); [all …]
|
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 *); 94 void bch2_opt_target_to_text(struct printbuf *, struct bch_fs *, struct bch_sb *, u64); 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 *); [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 rebalance_wakeup(struct bch_fs *c) in 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 | alloc_background.h | 14 static inline bool bch2_dev_bucket_exists(struct bch_fs *c, struct bpos pos) in bch2_dev_bucket_exists() 246 int bch2_alloc_v1_validate(struct bch_fs *, struct bkey_s_c, 248 int bch2_alloc_v2_validate(struct bch_fs *, struct bkey_s_c, 250 int bch2_alloc_v3_validate(struct bch_fs *, struct bkey_s_c, 252 int bch2_alloc_v4_validate(struct bch_fs *, struct bkey_s_c, 255 void bch2_alloc_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c); 286 int bch2_bucket_gens_validate(struct bch_fs *, struct bkey_s_c, 288 void bch2_bucket_gens_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c); 295 int bch2_bucket_gens_init(struct bch_fs *); 304 int bch2_alloc_read(struct bch_fs *); [all …]
|
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() 99 void bch2_journal_keys_to_write_buffer_start(struct bch_fs *, struct journal_keys_to_wb *, u64); 100 int bch2_journal_keys_to_write_buffer_end(struct bch_fs *, struct journal_keys_to_wb *); [all …]
|
H A D | super-io.h | 24 bool bch2_set_version_incompat(struct bch_fs *, enum bcachefs_metadata_version); 26 static inline bool 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 *); 97 int bch2_write_super(struct bch_fs *); 98 void __bch2_check_set_feature(struct bch_fs *, unsigned); 100 static inline void bch2_check_set_feature(struct bch_fs *c, unsigned feat) in bch2_check_set_feature() [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 | 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() 130 void __bch2_i_sectors_acct(struct bch_fs *, struct bch_inode_info *, 133 static inline void bch2_i_sectors_acct(struct bch_fs *c, struct bch_inode_info *inode, in bch2_i_sectors_acct() 159 void bch2_inode_flush_nocow_writes_async(struct bch_fs *, 162 int __must_check bch2_write_inode_size(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, 57 int bch2_bkey_in_btree_node(struct bch_fs *, struct btree *, struct bkey_s_c, 62 void bch2_val_to_text(struct printbuf *, struct bch_fs *, [all …]
|
H A D | checksum.h | 34 struct bch_csum bch2_checksum(struct bch_fs *, unsigned, struct nonce, 78 int bch2_encrypt(struct bch_fs *, unsigned, struct nonce, 81 struct bch_csum bch2_checksum_bio(struct bch_fs *, unsigned, 84 int bch2_rechecksum_bio(struct bch_fs *, struct bio *, struct bversion, 90 int __bch2_encrypt_bio(struct bch_fs *, unsigned, 93 static inline int bch2_encrypt_bio(struct bch_fs *c, unsigned type, in bch2_encrypt_bio() 103 int bch2_decrypt_sb_key(struct bch_fs *, struct bch_sb_field_crypt *, 106 int bch2_disable_encryption(struct bch_fs *); 107 int bch2_enable_encryption(struct bch_fs *, bool); 109 void bch2_fs_encryption_exit(struct bch_fs *); [all …]
|
H A D | sb-members.h | 16 int bch2_sb_members_v2_init(struct bch_fs *c); 70 static inline struct bch_dev *__bch2_next_dev_idx(struct bch_fs *c, unsigned idx, in __bch2_next_dev_idx() 85 static inline struct bch_dev *__bch2_next_dev(struct bch_fs *c, struct bch_dev *ca, in __bch2_next_dev() 124 static inline struct bch_dev *bch2_get_next_dev(struct bch_fs *c, struct bch_dev *ca) in bch2_get_next_dev() 145 static inline struct bch_dev *bch2_get_next_online_dev(struct bch_fs *c, in bch2_get_next_online_dev() 175 static inline bool bch2_dev_exists(const struct bch_fs *c, unsigned dev) in bch2_dev_exists() 185 static inline struct bch_dev *bch2_dev_have_ref(const struct bch_fs *c, unsigned dev) in bch2_dev_have_ref() 192 static inline struct bch_dev *bch2_dev_locked(struct bch_fs *c, unsigned dev) in bch2_dev_locked() 201 static inline struct bch_dev *bch2_dev_rcu_noerror(struct bch_fs *c, unsigned dev) in bch2_dev_rcu_noerror() 208 void bch2_dev_missing(struct bch_fs *, unsigned); [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 | 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() 24 static inline void clear_btree_node_dirty_acct(struct bch_fs *c, struct btree *b) in clear_btree_node_dirty_acct() 38 struct bch_fs *c; 70 bool bch2_compact_whiteouts(struct bch_fs *, struct btree *, 82 static inline bool bch2_maybe_compact_whiteouts(struct bch_fs *c, struct btree *b) in bch2_maybe_compact_whiteouts() 101 static inline int bset_encrypt(struct bch_fs *c, struct bset *i, unsigned offset) in bset_encrypt() 122 void bch2_btree_sort_into(struct bch_fs *, struct btree *, struct btree *); 129 int bch2_btree_node_read_done(struct bch_fs *, struct bch_dev *, 132 int bch2_btree_root_read(struct bch_fs *, enum btree_id, [all …]
|
H A D | btree_update_interior.h | 47 struct bch_fs *c; 172 void bch2_btree_node_rewrite_async(struct bch_fs *, struct btree *); 179 void bch2_btree_set_root_for_read(struct bch_fs *, struct btree *); 182 void bch2_btree_root_alloc_fake(struct bch_fs *, enum btree_id, unsigned); 184 static inline unsigned btree_update_reserve_required(struct bch_fs *c, in btree_update_reserve_required() 277 static inline struct btree_node_entry *want_new_bset(struct bch_fs *c, struct btree *b) in want_new_bset() 329 void bch2_btree_updates_to_text(struct printbuf *, struct bch_fs *); 331 bool bch2_btree_interior_updates_flush(struct bch_fs *); 333 void bch2_journal_entry_to_btree_root(struct bch_fs *, struct jset_entry *); 334 struct jset_entry *bch2_btree_roots_to_journal_entries(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 | error.h | 11 struct bch_fs; 32 bool bch2_inconsistent_error(struct bch_fs *); 34 int bch2_topology_error(struct bch_fs *); 94 int __bch2_fsck_err(struct bch_fs *, struct btree_trans *, 99 __bch2_fsck_err(type_is(c, struct bch_fs *) ? (struct bch_fs *) c : NULL,\ 103 void bch2_flush_fsck_errs(struct bch_fs *); 127 if (type_is(c, struct bch_fs *)) \ 128 WARN_ON(bch2_current_has_btree_trans((struct bch_fs *) c));\ 158 int __bch2_bkey_fsck_err(struct bch_fs *, 191 void bch2_fatal_error(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 *);
|