| /linux-6.15/fs/bcachefs/ |
| H A D | sb-members.h | 31 struct bch_dev *ca = bch2_dev_rcu(c, dev); in bch2_dev_idx_is_online() 85 struct bch_dev *ca = NULL; in __bch2_next_dev_idx() 97 static inline struct bch_dev *__bch2_next_dev(struct bch_fs *c, struct bch_dev *ca, in __bch2_next_dev() 104 for (struct bch_dev *_ca = NULL; \ 136 static inline struct bch_dev *bch2_get_next_dev(struct bch_fs *c, struct bch_dev *ca) in bch2_get_next_dev() 154 for (struct bch_dev *_ca = NULL; \ 158 struct bch_dev *ca, in bch2_get_next_online_dev() 176 for (struct bch_dev *_ca = NULL; \ 272 static inline struct bch_dev *bch2_dev_iterate_noerror(struct bch_fs *c, struct bch_dev *ca, unsign… in bch2_dev_iterate_noerror() 280 static inline struct bch_dev *bch2_dev_iterate(struct bch_fs *c, struct bch_dev *ca, unsigned dev_i… in bch2_dev_iterate() [all …]
|
| H A D | buckets.h | 64 static inline struct bucket_gens *bucket_gens(struct bch_dev *ca) in bucket_gens() 70 static inline u8 *bucket_gen(struct bch_dev *ca, size_t b) in bucket_gen() 85 static inline int bucket_gen_get(struct bch_dev *ca, size_t b) in bucket_gen_get() 93 static inline size_t PTR_BUCKET_NR(const struct bch_dev *ca, in PTR_BUCKET_NR() 112 static inline struct bucket *PTR_GC_BUCKET(struct bch_dev *ca, in PTR_GC_BUCKET() 215 static inline u64 dev_buckets_free(struct bch_dev *ca, in dev_buckets_free() 225 static inline u64 __dev_buckets_available(struct bch_dev *ca, in __dev_buckets_available() 238 static inline u64 dev_buckets_available(struct bch_dev *ca, in dev_buckets_available() 280 int bch2_trans_mark_dev_sb(struct bch_fs *, struct bch_dev *, 286 bool bch2_is_superblock_bucket(struct bch_dev *, u64); [all …]
|
| H A 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 *);
|
| H A D | alloc_background.h | 17 struct bch_dev *ca = bch2_dev_rcu_noerror(c, pos.inode); in bch2_dev_bucket_exists() 108 static inline s64 bch2_bucket_sectors_fragmented(struct bch_dev *ca, in bch2_bucket_sectors_fragmented() 167 struct bch_dev *ca) in alloc_lru_idx_fragmentation() 316 void bch2_dev_do_discards(struct bch_dev *); 319 static inline u64 should_invalidate_buckets(struct bch_dev *ca, in should_invalidate_buckets() 331 void bch2_dev_do_invalidates(struct bch_dev *); 348 int bch2_dev_remove_alloc(struct bch_fs *, struct bch_dev *); 353 void bch2_dev_allocator_remove(struct bch_fs *, struct bch_dev *); 354 void bch2_dev_allocator_add(struct bch_fs *, struct bch_dev *); 356 void bch2_dev_allocator_background_exit(struct bch_dev *); [all …]
|
| H A D | alloc_foreground.h | 13 struct bch_dev; 29 void bch2_dev_stripe_increment(struct bch_dev *, struct dev_stripe_state *); 31 static inline struct bch_dev *ob_dev(struct bch_fs *c, struct open_bucket *ob) in ob_dev() 53 struct open_bucket *bch2_bucket_alloc(struct bch_fs *, struct bch_dev *, 211 struct bch_dev *ca = ob_dev(c, ob); in bch2_alloc_sectors_append_ptrs_inlined() 229 void bch2_open_buckets_stop(struct bch_fs *c, struct bch_dev *, bool); 244 void bch2_open_buckets_to_text(struct printbuf *, struct bch_fs *, struct bch_dev *); 250 void bch2_dev_alloc_debug_to_text(struct printbuf *, struct bch_dev *);
|
| H A 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() 46 static inline struct bpos bp_pos_to_bucket_and_offset(const struct bch_dev *ca, struct bpos bp_pos, in bp_pos_to_bucket_and_offset() 57 struct bch_dev *ca = bch2_dev_rcu_noerror(c, bp_pos.inode); in bp_pos_to_bucket_nodev_noerror() 64 static inline struct bpos bucket_pos_to_bp_noerror(const struct bch_dev *ca, in bucket_pos_to_bp_noerror() 76 static inline struct bpos bucket_pos_to_bp(const struct bch_dev *ca, in bucket_pos_to_bp() 85 static inline struct bpos bucket_pos_to_bp_start(const struct bch_dev *ca, struct bpos bucket) in bucket_pos_to_bp_start() 90 static inline struct bpos bucket_pos_to_bp_end(const struct bch_dev *ca, struct bpos bucket) in bucket_pos_to_bp_end()
|
| H A D | error.h | 10 struct bch_dev; 210 void bch2_io_error(struct bch_dev *, enum bch_member_error_type); 213 void bch2_latency_acct(struct bch_dev *, u64, int); 215 static inline void bch2_latency_acct(struct bch_dev *ca, u64 submit_time, int rw) {} in bch2_latency_acct() 218 static inline void bch2_account_io_success_fail(struct bch_dev *ca, in bch2_account_io_success_fail() 231 static inline void bch2_account_io_completion(struct bch_dev *ca, in bch2_account_io_completion()
|
| H A D | super.c | 181 static void bch2_dev_free(struct bch_dev *); 1022 struct bch_dev *ca; in bch2_fs_may_start() 1246 struct bch_dev *ca = container_of(kobj, struct bch_dev, kobj); in bch2_dev_release() 1303 struct bch_dev *ca = container_of(ref, struct bch_dev, ref); in bch2_dev_ref_complete() 1311 struct bch_dev *ca = container_of(ref, struct bch_dev, io_ref[READ]); in bch2_dev_io_ref_read_complete() 1318 struct bch_dev *ca = container_of(ref, struct bch_dev, io_ref[WRITE]); in bch2_dev_io_ref_write_complete() 1375 struct bch_dev *ca; in __bch2_dev_alloc() 1443 struct bch_dev *ca = NULL; in bch2_dev_alloc() 1503 struct bch_dev *ca; in bch2_dev_attach_bdev() 1773 struct bch_dev *ca = NULL; in bch2_dev_add() [all …]
|
| H A D | alloc_background.c | 595 struct bch_dev *ca = NULL; in bch2_alloc_read() 698 struct bch_dev *ca, in bch2_bucket_do_index() 1242 struct bch_dev *ca, in bch2_check_alloc_hole_freespace() 1558 struct bch_dev *ca = NULL; in bch2_check_alloc_info() 1823 struct bch_dev *ca, in bch2_discard_one_bucket() 1931 struct bch_dev *ca = container_of(work, struct bch_dev, discard_work); in bch2_do_discards_work() 2011 struct bch_dev *ca = container_of(work, struct bch_dev, discard_fast_work); in bch2_do_discards_fast_work() 2076 struct bch_dev *ca, in invalidate_one_bp() 2104 struct bch_dev *ca, in invalidate_one_bucket_by_bps() 2133 struct bch_dev *ca, in invalidate_one_bucket() [all …]
|
| H A D | journal.h | 438 struct bch_dev; 447 int bch2_set_nr_journal_buckets(struct bch_fs *, struct bch_dev *, 449 int bch2_dev_journal_alloc(struct bch_dev *, bool); 452 void bch2_dev_journal_stop(struct journal *, struct bch_dev *); 458 void bch2_dev_journal_exit(struct bch_dev *); 459 int bch2_dev_journal_init(struct bch_dev *, struct bch_sb *);
|
| H A D | buckets.c | 84 struct bch_dev *ca, in bch2_dev_usage_to_text() 119 struct bch_dev *ca = bch2_dev_tryget(c, p.ptr.dev); in bch2_check_fix_ptr() 303 struct bch_dev *ca = bch2_dev_rcu(c, ptr->dev); in bch2_check_fix_ptrs() 317 struct bch_dev *ca = bch2_dev_rcu(c, p.ptr.dev); in bch2_check_fix_ptrs() 599 struct bch_dev *ca = bch2_dev_tryget(c, p.ptr.dev); in bch2_trigger_pointer() 955 struct bch_dev *ca, u64 b, in __bch2_trans_mark_metadata_bucket() 1035 struct bch_dev *ca, u64 b, in bch2_trans_mark_metadata_bucket() 1059 struct bch_dev *ca, u64 start, u64 end, in bch2_trans_mark_metadata_sectors() 1134 int bch2_trans_mark_dev_sb(struct bch_fs *c, struct bch_dev *ca, in bch2_trans_mark_dev_sb() 1162 bool bch2_is_superblock_bucket(struct bch_dev *ca, u64 b) in bch2_is_superblock_bucket() [all …]
|
| H A D | chardev.c | 28 static struct bch_dev *bch2_device_lookup(struct bch_fs *c, u64 dev, in bch2_device_lookup() 31 struct bch_dev *ca; in bch2_device_lookup() 210 struct bch_dev *ca; in bch2_ioctl_disk_remove() 252 struct bch_dev *ca; in bch2_ioctl_disk_offline() 277 struct bch_dev *ca; in bch2_ioctl_disk_set_state() 351 struct bch_dev *ca = bch2_dev_tryget(c, ctx->arg.scrub.dev); in bch2_data_job_read() 477 struct bch_dev *ca; in bch2_ioctl_dev_usage() 518 struct bch_dev *ca; in bch2_ioctl_dev_usage_v2() 567 struct bch_dev *ca = NULL; in bch2_ioctl_read_super() 628 struct bch_dev *ca; in bch2_ioctl_disk_resize() [all …]
|
| H A D | alloc_foreground.c | 103 struct bch_dev *ca = ob_dev(c, ob); in __bch2_open_bucket_put() 288 struct bch_dev *ca, in bch2_bucket_alloc_early() 381 struct bch_dev *ca, in bch2_bucket_alloc_freelist() 508 struct bch_dev *ca, in bch2_bucket_alloc_trans() 840 struct bch_dev *ca = ob_dev(c, ob); in want_bucket() 909 struct bch_dev *ca = ob_dev(c, ob); in bucket_alloc_set_partial() 1057 struct bch_dev *ca, bool ec) in should_drop_bucket() 1431 struct bch_dev *ca = ob_dev(c, ob); in bch2_alloc_sectors_start_trans() 1479 struct bch_dev *ca = ob_dev(c, ob); in bch2_ob_ptr() 1555 struct bch_dev *ca = ob_dev(c, ob); in bch2_open_bucket_to_text() [all …]
|
| H A 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 *);
|
| H A D | sysfs.c | 597 struct bch_dev *ca, in sysfs_opt_show() 618 struct bch_dev *ca, in sysfs_opt_store() 760 static void dev_io_done_to_text(struct printbuf *out, struct bch_dev *ca) in dev_io_done_to_text() 776 struct bch_dev *ca = container_of(kobj, struct bch_dev, kobj); in SHOW() 829 struct bch_dev *ca = container_of(kobj, struct bch_dev, kobj); in STORE()
|
| H A D | extents.c | 82 static inline u64 dev_latency(struct bch_dev *ca) in dev_latency() 87 static inline int dev_failed(struct bch_dev *ca) in dev_failed() 98 struct bch_dev *ca1, in ptr_better() 102 struct bch_dev *ca2 = bch2_dev_rcu(c, p2.ptr.dev); in ptr_better() 165 struct bch_dev *ca = bch2_dev_rcu(c, p.ptr.dev); in bch2_bkey_pick_read_device() 357 struct bch_dev *ca = bch2_dev_rcu(c, lp.ptr.dev); in bch2_extent_merge() 754 struct bch_dev *ca = bch2_dev_rcu(c, p->ptr.dev); in bch2_extent_ptr_desired_durability() 761 struct bch_dev *ca = bch2_dev_rcu(c, p->ptr.dev); in bch2_extent_ptr_durability() 952 struct bch_dev *ca; in bch2_bkey_has_target() 1064 struct bch_dev *ca = bch2_dev_rcu_noerror(c, ptr->dev); in want_cached_ptr() [all …]
|
| H A 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() 491 int bch2_dev_group_set(struct bch_fs *c, struct bch_dev *ca, const char *name) in bch2_dev_group_set() 506 struct bch_dev *ca; in bch2_opt_target_parse() 549 struct bch_dev *ca; in bch2_target_to_text()
|
| H A D | journal_sb.h | 24 int bch2_journal_buckets_to_sb(struct bch_fs *, struct bch_dev *, u64 *, unsigned);
|
| H A D | io_read.c | 45 struct bch_dev *ca; in bch2_target_congested() 396 struct bch_dev *ca = bch2_dev_have_ref(rbio->c, rbio->pick.ptr.dev); in bch2_rbio_free() 577 struct bch_dev *ca = rbio->have_ioref ? bch2_dev_have_ref(c, rbio->pick.ptr.dev) : NULL; in bch2_read_io_err() 670 struct bch_dev *ca = rbio->have_ioref ? bch2_dev_have_ref(c, rbio->pick.ptr.dev) : NULL; in bch2_read_csum_err() 690 struct bch_dev *ca = rbio->have_ioref ? bch2_dev_have_ref(c, rbio->pick.ptr.dev) : NULL; in bch2_read_decompress_err() 710 struct bch_dev *ca = rbio->have_ioref ? bch2_dev_have_ref(c, rbio->pick.ptr.dev) : NULL; in bch2_read_decrypt_err() 726 struct bch_dev *ca = rbio->have_ioref ? bch2_dev_have_ref(c, rbio->pick.ptr.dev) : NULL; in __bch2_read_endio() 855 struct bch_dev *ca = rbio->have_ioref ? bch2_dev_have_ref(c, rbio->pick.ptr.dev) : NULL; in bch2_read_endio() 893 struct bch_dev *ca, in read_from_stale_dirty_pointer() 997 struct bch_dev *ca = bch2_dev_get_ioref(c, pick.ptr.dev, READ); in __bch2_read_extent()
|
| H A D | sb-members.c | 18 void bch2_dev_bucket_missing(struct bch_dev *ca, u64 bucket) in bch2_dev_bucket_missing() 365 void bch2_dev_io_errors_to_text(struct printbuf *out, struct bch_dev *ca) in bch2_dev_io_errors_to_text() 396 void bch2_dev_errors_reset(struct bch_dev *ca) in bch2_dev_errors_reset() 423 struct bch_dev *ca = bch2_dev_rcu(c, ptr->dev); in bch2_dev_btree_bitmap_marked()
|
| H A D | bcachefs.h | 281 struct bch_dev *: ((struct bch_dev *) (_c))->fs, \ 517 struct bch_dev { struct 751 struct bch_dev __rcu *devs[BCH_SB_MEMBERS_MAX]; 1181 static inline unsigned bucket_bytes(const struct bch_dev *ca) in bucket_bytes()
|
| H A D | journal_io.c | 141 static int journal_entry_add(struct bch_fs *c, struct bch_dev *ca, in journal_entry_add() 905 struct bch_dev *ca, in jset_validate() 959 struct bch_dev *ca, in jset_validate_early() 1028 static int journal_read_bucket(struct bch_dev *ca, in journal_read_bucket() 1189 struct bch_dev *ca = container_of(ja, struct bch_dev, journal); in CLOSURE_CALLBACK() 1419 struct bch_dev *ca = bch2_dev_have_ref(c, ptr->dev); in bch2_journal_read() 1470 struct bch_dev *ca = rcu_dereference(c->devs[*i]); in journal_advance_devs_to_next_bucket() 1502 struct bch_dev *ca = rcu_dereference(c->devs[*i]); in __journal_write_alloc() 1567 struct bch_dev *ca = bch2_dev_rcu_noerror(c, p->dev); in journal_write_alloc() 1753 struct bch_dev *ca = jbio->ca; in journal_write_endio() [all …]
|
| H A D | backpointers.c | 41 struct bch_dev *ca = bch2_dev_rcu_noerror(c, bp.k->p.inode); in bch2_backpointer_to_text() 481 struct bch_dev *ca = bch2_dev_get_ioref(c, dev, READ); in check_extent_checksum() 576 struct bch_dev *ca = bch2_dev_rcu_noerror(c, bp->k.p.inode); in check_bp_exists() 671 struct bch_dev *ca = bch2_dev_rcu_noerror(c, p.ptr.dev); in check_extent_to_backpointers() 854 static int check_bucket_backpointers_to_extents(struct btree_trans *, struct bch_dev *, struct bpos… 872 struct bch_dev *ca = bch2_dev_bucket_tryget_noerror(trans->c, alloc_k.k->p); in check_bucket_backpointer_mismatch() 958 struct bch_dev *ca = bch2_dev_rcu_noerror(c, pos.inode); in backpointer_node_has_missing() 1196 struct bch_dev *ca, struct bpos bucket) in check_bucket_backpointers_to_extents()
|
| H A D | replicas.h | 50 unsigned bch2_dev_has_data(struct bch_fs *, struct bch_dev *);
|
| H A D | disk_accounting.h | 179 struct bch_dev *ca = bch2_dev_rcu_noerror(c, acc_k.dev_data_type.dev); in bch2_accounting_mem_mod_locked() 294 int bch2_dev_usage_init(struct bch_dev *, bool);
|