/linux-6.12.1/fs/bcachefs/ |
D | sb-members.h | 21 static inline bool bch2_dev_is_online(struct bch_dev *ca) in bch2_dev_is_online() 26 static inline bool bch2_dev_is_readable(struct bch_dev *ca) in bch2_dev_is_readable() 70 static inline struct bch_dev *__bch2_next_dev_idx(struct bch_fs *c, unsigned idx, in __bch2_next_dev_idx() 73 struct bch_dev *ca = NULL; 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() 92 for (struct bch_dev *_ca = NULL; \ 95 static inline void bch2_dev_get(struct bch_dev *ca) in bch2_dev_get() 104 static inline void __bch2_dev_put(struct bch_dev *ca) in __bch2_dev_put() 118 static inline void bch2_dev_put(struct bch_dev *ca) in bch2_dev_put() 124 static inline struct bch_dev *bch2_get_next_dev(struct bch_fs *c, struct bch_dev *ca) in bch2_get_next_dev() [all …]
|
D | buckets.h | 15 static inline u64 sector_to_bucket(const struct bch_dev *ca, sector_t s) in sector_to_bucket() 20 static inline sector_t bucket_to_sector(const struct bch_dev *ca, size_t b) in bucket_to_sector() 25 static inline sector_t bucket_remainder(const struct bch_dev *ca, sector_t s) in bucket_remainder() 33 static inline u64 sector_to_bucket_and_offset(const struct bch_dev *ca, sector_t s, u32 *offset) in sector_to_bucket_and_offset() 83 static inline struct bucket *gc_bucket(struct bch_dev *ca, size_t b) in gc_bucket() 88 static inline struct bucket_gens *bucket_gens(struct bch_dev *ca) in bucket_gens() 97 static inline u8 *bucket_gen(struct bch_dev *ca, size_t b) in bucket_gen() 106 static inline int bucket_gen_get_rcu(struct bch_dev *ca, size_t b) in bucket_gen_get_rcu() 112 static inline int bucket_gen_get(struct bch_dev *ca, size_t b) in bucket_gen_get() 120 static inline size_t PTR_BUCKET_NR(const struct bch_dev *ca, in PTR_BUCKET_NR() [all …]
|
D | super.h | 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 *, 23 int bch2_dev_fail(struct bch_dev *, int); 24 int bch2_dev_remove(struct bch_fs *, struct bch_dev *, int); 27 int bch2_dev_offline(struct bch_fs *, struct bch_dev *, int); 28 int bch2_dev_resize(struct bch_fs *, struct bch_dev *, u64); 29 struct bch_dev *bch2_dev_lookup(struct bch_fs *, const char *);
|
D | alloc_background.h | 19 struct bch_dev *ca = bch2_dev_rcu_noerror(c, pos.inode); in bch2_dev_bucket_exists() 110 static inline s64 bch2_bucket_sectors_fragmented(struct bch_dev *ca, in bch2_bucket_sectors_fragmented() 118 static inline s64 bch2_gc_bucket_sectors_fragmented(struct bch_dev *ca, struct bucket a) in bch2_gc_bucket_sectors_fragmented() 169 struct bch_dev *ca) in alloc_lru_idx_fragmentation() 304 int bch2_alloc_key_to_dev_counters(struct btree_trans *, struct bch_dev *, 312 void bch2_dev_do_discards(struct bch_dev *); 315 static inline u64 should_invalidate_buckets(struct bch_dev *ca, in should_invalidate_buckets() 327 void bch2_dev_do_invalidates(struct bch_dev *); 342 int bch2_dev_freespace_init(struct bch_fs *, struct bch_dev *, u64, u64); 344 int bch2_dev_remove_alloc(struct bch_fs *, struct bch_dev *); [all …]
|
D | backpointers.h | 39 static inline struct bpos bp_pos_to_bucket(const struct bch_dev *ca, struct bpos bp_pos) in bp_pos_to_bucket() 49 struct bch_dev *ca = bch2_dev_rcu(c, bp_pos.inode); in bp_pos_to_bucket_nodev_noerror() 62 static inline struct bpos bucket_pos_to_bp_noerror(const struct bch_dev *ca, in bucket_pos_to_bp_noerror() 74 static inline struct bpos bucket_pos_to_bp(const struct bch_dev *ca, in bucket_pos_to_bp() 83 int bch2_bucket_backpointer_mod_nowritebuffer(struct btree_trans *, struct bch_dev *, 87 struct bch_dev *ca, in bch2_bucket_backpointer_mod() 137 static inline void __bch2_extent_ptr_to_bp(struct bch_fs *c, struct bch_dev *ca, in __bch2_extent_ptr_to_bp() 157 static inline void bch2_extent_ptr_to_bp(struct bch_fs *c, struct bch_dev *ca, in bch2_extent_ptr_to_bp() 168 int bch2_get_next_backpointer(struct btree_trans *, struct bch_dev *ca, struct bpos, int,
|
D | alloc_foreground.h | 13 struct bch_dev; 29 void bch2_dev_stripe_increment(struct bch_dev *, struct dev_stripe_state *); 31 long bch2_bucket_alloc_new_fs(struct bch_dev *); 33 static inline struct bch_dev *ob_dev(struct bch_fs *c, struct open_bucket *ob) in ob_dev() 38 struct open_bucket *bch2_bucket_alloc(struct bch_fs *, struct bch_dev *, 194 struct bch_dev *ca = ob_dev(c, ob); in bch2_alloc_sectors_append_ptrs_inlined() 212 void bch2_open_buckets_stop(struct bch_fs *c, struct bch_dev *, bool); 227 void bch2_open_buckets_to_text(struct printbuf *, struct bch_fs *, struct bch_dev *); 233 void bch2_dev_alloc_debug_to_text(struct printbuf *, struct bch_dev *);
|
D | super.c | 187 static void bch2_dev_unlink(struct bch_dev *); 188 static void bch2_dev_free(struct bch_dev *); 190 static int bch2_dev_sysfs_online(struct bch_fs *, struct bch_dev *); 191 static void __bch2_dev_read_only(struct bch_fs *, struct bch_dev *); 662 struct bch_dev *ca = rcu_dereference_protected(c->devs[i], true); in bch2_fs_free() 1181 struct bch_dev *ca = container_of(kobj, struct bch_dev, kobj); in bch2_dev_release() 1186 static void bch2_dev_free(struct bch_dev *ca) in bch2_dev_free() 1213 static void __bch2_dev_offline(struct bch_fs *c, struct bch_dev *ca) in __bch2_dev_offline() 1236 struct bch_dev *ca = container_of(ref, struct bch_dev, ref); in bch2_dev_ref_complete() 1244 struct bch_dev *ca = container_of(ref, struct bch_dev, io_ref); in bch2_dev_io_ref_complete() [all …]
|
D | journal.h | 417 struct bch_dev; 434 int bch2_set_nr_journal_buckets(struct bch_fs *, struct bch_dev *, 436 int bch2_dev_journal_alloc(struct bch_dev *, bool); 439 void bch2_dev_journal_stop(struct journal *, struct bch_dev *); 444 void bch2_dev_journal_exit(struct bch_dev *); 445 int bch2_dev_journal_init(struct bch_dev *, struct bch_sb *);
|
D | alloc_background.c | 35 static void bch2_discard_one_bucket_fast(struct bch_dev *, u64); 349 struct bch_dev *ca = c ? bch2_dev_bucket_tryget_noerror(c, k.k->p) : NULL; in bch2_alloc_to_text() 599 struct bch_dev *ca = NULL; in bch2_alloc_read() 668 struct bch_dev *ca, in bch2_bucket_do_index() 774 static inline int bch2_dev_data_type_accounting_mod(struct btree_trans *trans, struct bch_dev *ca, in bch2_dev_data_type_accounting_mod() 790 int bch2_alloc_key_to_dev_counters(struct btree_trans *trans, struct bch_dev *ca, in bch2_alloc_key_to_dev_counters() 838 struct bch_dev *ca = bch2_dev_bucket_tryget(c, new.k->p); in bch2_trigger_alloc() 1065 static bool next_bucket(struct bch_fs *c, struct bch_dev **ca, struct bpos *bucket) in next_bucket() 1092 struct bch_dev **ca, struct bkey *hole) in bch2_get_key_or_real_bucket_hole() 1138 struct bch_dev *ca = bch2_dev_bucket_tryget_noerror(c, alloc_k.k->p); in bch2_check_alloc_key() [all …]
|
D | buckets.c | 29 void bch2_dev_usage_read_fast(struct bch_dev *ca, struct bch_dev_usage *usage) in bch2_dev_usage_read_fast() 75 struct bch_dev *ca, in bch2_dev_usage_to_text() 110 struct bch_dev *ca = bch2_dev_tryget(c, p.ptr.dev); in bch2_check_fix_ptr() 296 struct bch_dev *ca = bch2_dev_rcu(c, ptr->dev); in bch2_check_fix_ptrs() 310 struct bch_dev *ca = bch2_dev_rcu(c, p.ptr.dev); in bch2_check_fix_ptrs() 388 int bch2_bucket_ref_update(struct btree_trans *trans, struct bch_dev *ca, in bch2_bucket_ref_update() 542 static int __mark_pointer(struct btree_trans *trans, struct bch_dev *ca, in __mark_pointer() 576 struct bch_dev *ca = bch2_dev_tryget(c, p.ptr.dev); in bch2_trigger_pointer() 950 struct bch_dev *ca, u64 b, in __bch2_trans_mark_metadata_bucket() 986 static int bch2_mark_metadata_bucket(struct btree_trans *trans, struct bch_dev *ca, in bch2_mark_metadata_bucket() [all …]
|
D | alloc_foreground.c | 103 struct bch_dev *ca = ob_dev(c, ob); in __bch2_open_bucket_put() 179 long bch2_bucket_alloc_new_fs(struct bch_dev *ca) in bch2_bucket_alloc_new_fs() 209 static struct open_bucket *__try_alloc_bucket(struct bch_fs *c, struct bch_dev *ca, in __try_alloc_bucket() 278 static struct open_bucket *try_alloc_bucket(struct btree_trans *trans, struct bch_dev *ca, in try_alloc_bucket() 387 struct bch_dev *ca, in bch2_bucket_alloc_early() 480 struct bch_dev *ca, in bch2_bucket_alloc_freelist() 552 static noinline void trace_bucket_alloc2(struct bch_fs *c, struct bch_dev *ca, in trace_bucket_alloc2() 603 struct bch_dev *ca, in bch2_bucket_alloc_trans() 683 struct open_bucket *bch2_bucket_alloc(struct bch_fs *c, struct bch_dev *ca, in bch2_bucket_alloc() 720 static inline void bch2_dev_stripe_increment_inlined(struct bch_dev *ca, in bch2_dev_stripe_increment_inlined() [all …]
|
D | disk_groups.h | 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 *);
|
D | chardev.c | 27 static struct bch_dev *bch2_device_lookup(struct bch_fs *c, u64 dev, in bch2_device_lookup() 30 struct bch_dev *ca; in bch2_device_lookup() 333 struct bch_dev *ca; in bch2_ioctl_disk_remove() 375 struct bch_dev *ca; in bch2_ioctl_disk_offline() 400 struct bch_dev *ca; in bch2_ioctl_disk_set_state() 581 struct bch_dev *ca; in bch2_ioctl_dev_usage() 622 struct bch_dev *ca; in bch2_ioctl_dev_usage_v2() 671 struct bch_dev *ca = NULL; in bch2_ioctl_read_super() 732 struct bch_dev *ca; in bch2_ioctl_disk_resize() 755 struct bch_dev *ca; in bch2_ioctl_disk_resize_journal()
|
D | io_write.h | 15 void bch2_latency_acct(struct bch_dev *, u64, int); 17 static inline void bch2_latency_acct(struct bch_dev *ca, u64 submit_time, int rw) {} in bch2_latency_acct()
|
D | disk_groups.c | 211 struct bch_dev *ca = t.dev < c->sb.nr_devices in bch2_target_to_mask() 471 int __bch2_dev_group_set(struct bch_fs *c, struct bch_dev *ca, const char *name) in __bch2_dev_group_set() 492 int bch2_dev_group_set(struct bch_fs *c, struct bch_dev *ca, const char *name) in bch2_dev_group_set() 507 struct bch_dev *ca; in bch2_opt_target_parse() 550 struct bch_dev *ca; in bch2_target_to_text()
|
D | error.h | 10 struct bch_dev; 231 void bch2_io_error(struct bch_dev *, enum bch_member_error_type);
|
D | journal_sb.h | 24 int bch2_journal_buckets_to_sb(struct bch_fs *, struct bch_dev *, u64 *, unsigned);
|
D | backpointers.c | 35 struct bch_dev *ca = bch2_dev_rcu(c, p.ptr.dev); in extent_matches_bp() 63 struct bch_dev *ca = bch2_dev_rcu_noerror(c, bp.k->p.inode); in bch2_backpointer_validate() 96 struct bch_dev *ca = bch2_dev_rcu_noerror(c, k.k->p.inode); in bch2_backpointer_k_to_text() 170 struct bch_dev *ca, in bch2_bucket_backpointer_mod_nowritebuffer() 223 struct bch_dev *ca, in bch2_get_next_backpointer() 486 struct bch_dev *ca = bch2_dev_get_ioref(c, dev, READ); in check_extent_checksum() 538 struct bch_dev *ca = bch2_dev_bucket_tryget(c, bucket); in check_bp_exists() 680 struct bch_dev *ca = bch2_dev_rcu_noerror(c, p.ptr.dev); in check_extent_to_backpointers()
|
D | extents.c | 76 struct bch_dev *ca = bch2_dev_rcu(c, dev); in dev_latency() 138 struct bch_dev *ca = bch2_dev_rcu(c, p.ptr.dev); in bch2_bkey_pick_read_device() 288 struct bch_dev *ca = bch2_dev_rcu(c, lp.ptr.dev); in bch2_extent_merge() 667 static inline unsigned __extent_ptr_durability(struct bch_dev *ca, struct extent_ptr_decoded *p) in __extent_ptr_durability() 679 struct bch_dev *ca = bch2_dev_rcu(c, p->ptr.dev); in bch2_extent_ptr_desired_durability() 686 struct bch_dev *ca = bch2_dev_rcu(c, p->ptr.dev); in bch2_extent_ptr_durability() 877 struct bch_dev *ca; in bch2_bkey_has_target() 988 struct bch_dev *ca = bch2_dev_rcu_noerror(c, ptr->dev); in want_cached_ptr() 1037 struct bch_dev *ca; in bch2_extent_normalize() 1084 struct bch_dev *ca = bch2_dev_rcu_noerror(c, ptr->dev); in bch2_extent_ptr_to_text() [all …]
|
D | error.c | 53 struct bch_dev *ca = container_of(work, struct bch_dev, io_error_work); in bch2_io_error_work() 70 void bch2_io_error(struct bch_dev *ca, enum bch_member_error_type type) in bch2_io_error()
|
D | bcachefs.h | 279 struct bch_dev *: ((struct bch_dev *) (_c))->fs, \ 505 struct bch_dev { struct 746 struct bch_dev __rcu *devs[BCH_SB_MEMBERS_MAX]; 1176 static inline unsigned bucket_bytes(const struct bch_dev *ca) in bucket_bytes()
|
D | sysfs.c | 755 static void dev_io_done_to_text(struct printbuf *out, struct bch_dev *ca) in dev_io_done_to_text() 771 struct bch_dev *ca = container_of(kobj, struct bch_dev, kobj); in SHOW() 828 struct bch_dev *ca = container_of(kobj, struct bch_dev, kobj); in STORE()
|
D | disk_accounting.h | 144 struct bch_dev *ca = bch2_dev_rcu(c, acc_k.dev_data_type.dev); in bch2_accounting_mem_mod_locked() 217 int bch2_dev_usage_init(struct bch_dev *, bool);
|
D | journal_io.c | 137 static int journal_entry_add(struct bch_fs *c, struct bch_dev *ca, in journal_entry_add() 874 struct bch_dev *ca, in jset_validate() 924 struct bch_dev *ca, in jset_validate_early() 991 static int journal_read_bucket(struct bch_dev *ca, in journal_read_bucket() 1143 struct bch_dev *ca = container_of(ja, struct bch_dev, journal); in CLOSURE_CALLBACK() 1370 struct bch_dev *ca = bch2_dev_have_ref(c, ptr->dev); in bch2_journal_read() 1423 struct bch_dev *ca; in __journal_write_alloc() 1481 struct bch_dev *ca; in journal_write_alloc() 1691 struct bch_dev *ca = jbio->ca; in journal_write_endio() 1719 struct bch_dev *ca = bch2_dev_get_ioref(c, ptr->dev, WRITE); in CLOSURE_CALLBACK()
|
D | super-io.c | 628 int bch2_sb_from_fs(struct bch_fs *c, struct bch_dev *ca) in bch2_sb_from_fs() 872 struct bch_dev *ca = bio->bi_private; in write_super_endio() 889 static void read_back_super(struct bch_fs *c, struct bch_dev *ca) in read_back_super() 907 static void write_one_super(struct bch_fs *c, struct bch_dev *ca, unsigned idx) in write_one_super() 941 DARRAY(struct bch_dev *) online_devices = {}; in bch2_write_super() 1032 struct bch_dev *ca = *cap; in bch2_write_super() 1070 struct bch_dev *ca = *cap; in bch2_write_super() 1082 struct bch_dev *ca = *cap; in bch2_write_super()
|