Home
last modified time | relevance | path

Searched refs:bch_dev (Results 1 – 25 of 49) sorted by relevance

12

/fs/bcachefs/
A Dsb-members.h32 struct bch_dev *ca = bch2_dev_rcu(c, dev); in bch2_dev_idx_is_online()
83 struct bch_dev *ca = NULL; in __bch2_next_dev_idx()
95 static inline struct bch_dev *__bch2_next_dev(struct bch_fs *c, struct bch_dev *ca, in __bch2_next_dev()
102 for (struct bch_dev *_ca = NULL; \
140 static inline struct bch_dev *bch2_get_next_dev(struct bch_fs *c, struct bch_dev *ca) in bch2_get_next_dev()
156 for (struct bch_dev *_ca = NULL; \
160 struct bch_dev *ca, in bch2_get_next_online_dev()
177 for (struct bch_dev *_ca = NULL; \
274 static inline struct bch_dev *bch2_dev_iterate_noerror(struct bch_fs *c, struct bch_dev *ca, unsign… in bch2_dev_iterate_noerror()
282 static inline struct bch_dev *bch2_dev_iterate(struct bch_fs *c, struct bch_dev *ca, unsigned dev_i… in bch2_dev_iterate()
[all …]
A Dbuckets.h64 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()
91 static inline size_t PTR_BUCKET_NR(const struct bch_dev *ca, in PTR_BUCKET_NR()
110 static inline struct bucket *PTR_GC_BUCKET(struct bch_dev *ca, in PTR_GC_BUCKET()
211 static inline u64 dev_buckets_free(struct bch_dev *ca, in dev_buckets_free()
221 static inline u64 __dev_buckets_available(struct bch_dev *ca, in __dev_buckets_available()
234 static inline u64 dev_buckets_available(struct bch_dev *ca, in dev_buckets_available()
276 int bch2_trans_mark_dev_sb(struct bch_fs *, struct bch_dev *,
282 bool bch2_is_superblock_bucket(struct bch_dev *, u64);
[all …]
A Dsuper.h19 bool bch2_dev_state_allowed(struct bch_fs *, struct bch_dev *,
21 int __bch2_dev_set_state(struct bch_fs *, struct bch_dev *,
23 int bch2_dev_set_state(struct bch_fs *, struct bch_dev *,
26 int bch2_dev_fail(struct bch_dev *, int);
27 int bch2_dev_remove(struct bch_fs *, struct bch_dev *, int);
30 int bch2_dev_offline(struct bch_fs *, struct bch_dev *, int);
31 int bch2_dev_resize(struct bch_fs *, struct bch_dev *, u64);
32 struct bch_dev *bch2_dev_lookup(struct bch_fs *, const char *);
A Dalloc_background.h17 struct bch_dev *ca = bch2_dev_rcu_noerror(c, pos.inode); in bch2_dev_bucket_exists()
106 static inline s64 bch2_bucket_sectors_fragmented(struct bch_dev *ca, in bch2_bucket_sectors_fragmented()
165 struct bch_dev *ca) in alloc_lru_idx_fragmentation()
315 void bch2_dev_do_discards(struct bch_dev *);
318 static inline u64 should_invalidate_buckets(struct bch_dev *ca, in should_invalidate_buckets()
330 void bch2_dev_do_invalidates(struct bch_dev *);
347 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 …]
A Dbackpointers.h39 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()
63 static inline struct bpos bucket_pos_to_bp_noerror(const struct bch_dev *ca, in bucket_pos_to_bp_noerror()
75 static inline struct bpos bucket_pos_to_bp(const struct bch_dev *ca, in bucket_pos_to_bp()
84 static inline struct bpos bucket_pos_to_bp_start(const struct bch_dev *ca, struct bpos bucket) in bucket_pos_to_bp_start()
89 static inline struct bpos bucket_pos_to_bp_end(const struct bch_dev *ca, struct bpos bucket) in bucket_pos_to_bp_end()
184 int bch2_check_bucket_backpointer_mismatch(struct btree_trans *, struct bch_dev *, u64,
197 int bch2_bucket_bitmap_resize(struct bch_dev *, struct bucket_bitmap *, u64, u64);
A Dalloc_foreground.h15 struct bch_dev;
49 struct bch_dev *ca;
79 void bch2_dev_stripe_increment(struct bch_dev *, struct dev_stripe_state *);
81 static inline struct bch_dev *ob_dev(struct bch_fs *c, struct open_bucket *ob) in ob_dev()
103 struct open_bucket *bch2_bucket_alloc(struct bch_fs *, struct bch_dev *,
241 struct bch_dev *ca = ob_dev(c, ob); in bch2_ob_ptr()
270 struct bch_dev *ca = ob_dev(c, ob); in bch2_alloc_sectors_append_ptrs_inlined()
288 void bch2_open_buckets_stop(struct bch_fs *c, struct bch_dev *, bool);
303 void bch2_open_buckets_to_text(struct printbuf *, struct bch_fs *, struct bch_dev *);
309 void bch2_dev_alloc_debug_to_text(struct printbuf *, struct bch_dev *);
A Derror.h10 struct bch_dev;
217 void bch2_io_error(struct bch_dev *, enum bch_member_error_type);
220 void bch2_latency_acct(struct bch_dev *, u64, int);
222 static inline void bch2_latency_acct(struct bch_dev *ca, u64 submit_time, int rw) {} in bch2_latency_acct()
225 static inline void bch2_account_io_success_fail(struct bch_dev *ca, in bch2_account_io_success_fail()
238 static inline void bch2_account_io_completion(struct bch_dev *ca, in bch2_account_io_completion()
A Dsuper.c207 static void bch2_dev_unlink(struct bch_dev *);
208 static void bch2_dev_free(struct bch_dev *);
1126 struct bch_dev *ca; in bch2_fs_may_start()
1366 struct bch_dev *ca = container_of(kobj, struct bch_dev, kobj); in bch2_dev_release()
1371 static void bch2_dev_free(struct bch_dev *ca) in bch2_dev_free()
1426 struct bch_dev *ca = container_of(ref, struct bch_dev, ref); in bch2_dev_ref_complete()
1484 struct bch_dev *ca; in __bch2_dev_alloc()
1553 struct bch_dev *ca = NULL; in bch2_dev_alloc()
1618 struct bch_dev *ca; in bch2_dev_attach_bdev()
1901 struct bch_dev *ca = NULL; in bch2_dev_add()
[all …]
A Djournal.h438 struct bch_dev;
447 int bch2_set_nr_journal_buckets(struct bch_fs *, struct bch_dev *, unsigned);
448 int bch2_dev_journal_bucket_delete(struct bch_dev *, u64);
450 int bch2_dev_journal_alloc(struct bch_dev *, bool);
453 void bch2_dev_journal_stop(struct journal *, struct bch_dev *);
459 void bch2_dev_journal_exit(struct bch_dev *);
460 int bch2_dev_journal_init(struct bch_dev *, struct bch_sb *);
A Dalloc_background.c623 struct bch_dev *ca = NULL; in bch2_alloc_read()
726 struct bch_dev *ca, in bch2_bucket_do_index()
1254 struct bch_dev *ca, in bch2_check_alloc_hole_freespace()
1577 struct bch_dev *ca = NULL; in bch2_check_alloc_info()
1828 struct bch_dev *ca, in bch2_discard_one_bucket()
1936 struct bch_dev *ca = container_of(work, struct bch_dev, discard_work); in bch2_do_discards_work()
2016 struct bch_dev *ca = container_of(work, struct bch_dev, discard_fast_work); in bch2_do_discards_fast_work()
2081 struct bch_dev *ca, in invalidate_one_bp()
2109 struct bch_dev *ca, in invalidate_one_bucket_by_bps()
2138 struct bch_dev *ca, in invalidate_one_bucket()
[all …]
A Dchardev.c28 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()
352 struct bch_dev *ca = bch2_dev_tryget(c, ctx->arg.scrub.dev); in bch2_data_job_read()
492 struct bch_dev *ca; in bch2_ioctl_dev_usage()
533 struct bch_dev *ca; in bch2_ioctl_dev_usage_v2()
582 struct bch_dev *ca = NULL; in bch2_ioctl_read_super()
642 struct bch_dev *ca; in bch2_ioctl_disk_resize()
[all …]
A Dbuckets.c84 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()
314 struct bch_dev *ca = bch2_dev_rcu(c, ptr->dev); in bch2_check_fix_ptrs()
325 struct bch_dev *ca = bch2_dev_rcu(c, p.ptr.dev); in bch2_check_fix_ptrs()
632 struct bch_dev *ca = bch2_dev_tryget(c, p.ptr.dev); in bch2_trigger_pointer()
985 struct bch_dev *ca, u64 b, in __bch2_trans_mark_metadata_bucket()
1074 struct bch_dev *ca, u64 b, in bch2_trans_mark_metadata_bucket()
1098 struct bch_dev *ca, u64 start, u64 end, in bch2_trans_mark_metadata_sectors()
1173 int bch2_trans_mark_dev_sb(struct bch_fs *c, struct bch_dev *ca, in bch2_trans_mark_dev_sb()
1201 bool bch2_is_superblock_bucket(struct bch_dev *ca, u64 b) in bch2_is_superblock_bucket()
[all …]
A Dalloc_foreground.c102 struct bch_dev *ca = ob_dev(c, ob); in __bch2_open_bucket_put()
212 struct bch_dev *ca = req->ca; in __try_alloc_bucket()
290 struct bch_dev *ca = req->ca; in bch2_bucket_alloc_early()
380 struct bch_dev *ca = req->ca; in bch2_bucket_alloc_freelist()
502 struct bch_dev *ca = req->ca; in bch2_bucket_alloc_trans()
810 struct bch_dev *ca = ob_dev(c, ob); in want_bucket()
865 struct bch_dev *ca = ob_dev(c, ob); in bucket_alloc_set_partial()
978 struct bch_dev *ca, bool ec) in should_drop_bucket()
1343 struct bch_dev *ca = ob_dev(c, ob); in bch2_alloc_sectors_start_trans()
1453 struct bch_dev *ca = ob_dev(c, ob); in bch2_open_bucket_to_text()
[all …]
A Dextents.c68 struct bch_dev *ca = bch2_dev_rcu_noerror(c, f->dev); in bch2_io_failures_to_text()
141 static inline u64 dev_latency(struct bch_dev *ca) in dev_latency()
146 static inline int dev_failed(struct bch_dev *ca) in dev_failed()
157 struct bch_dev *ca1, in ptr_better()
161 struct bch_dev *ca2 = bch2_dev_rcu(c, p2.ptr.dev); in ptr_better()
220 struct bch_dev *ca = bch2_dev_rcu_noerror(c, p.ptr.dev); in bch2_bkey_pick_read_device()
423 struct bch_dev *ca = bch2_dev_rcu(c, lp.ptr.dev); in bch2_extent_merge()
819 struct bch_dev *ca = bch2_dev_rcu(c, p->ptr.dev); in bch2_extent_ptr_desired_durability()
826 struct bch_dev *ca = bch2_dev_rcu(c, p->ptr.dev); in bch2_extent_ptr_durability()
1013 struct bch_dev *ca; in bch2_bkey_has_target()
[all …]
A Ddisk_groups.h103 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 *);
A Dbackpointers.c19 static int bch2_bucket_bitmap_set(struct bch_dev *, struct bucket_bitmap *, u64);
51 struct bch_dev *ca; in bch2_backpointer_to_text()
493 struct bch_dev *ca = bch2_dev_get_ioref(c, dev, READ, in check_extent_checksum()
590 struct bch_dev *ca = bch2_dev_rcu_noerror(c, bp->k.p.inode); in check_bp_exists()
689 struct bch_dev *ca = bch2_dev_rcu_noerror(c, p.ptr.dev); in check_extent_to_backpointers()
898 struct bch_dev *ca = bch2_dev_bucket_tryget_noerror(trans->c, alloc_k.k->p); in check_bucket_backpointer_mismatch()
990 struct bch_dev *ca = bch2_dev_rcu_noerror(c, pos.inode); in backpointer_node_has_missing()
1199 struct bch_dev *ca, u64 bucket, in bch2_check_bucket_backpointer_mismatch()
1260 struct bch_dev *ca, struct bpos bucket) in check_bucket_backpointers_to_extents()
1347 static int bch2_bucket_bitmap_set(struct bch_dev *ca, struct bucket_bitmap *b, u64 bit) in bch2_bucket_bitmap_set()
[all …]
A Dsysfs.c626 struct bch_dev *ca, in sysfs_opt_show()
647 struct bch_dev *ca, in sysfs_opt_store()
783 static void dev_io_done_to_text(struct printbuf *out, struct bch_dev *ca) in dev_io_done_to_text()
799 struct bch_dev *ca = container_of(kobj, struct bch_dev, kobj); in SHOW()
858 struct bch_dev *ca = container_of(kobj, struct bch_dev, kobj); in STORE()
A Ddisk_groups.c180 struct bch_dev *ca = t.dev < c->sb.nr_devices in bch2_target_to_mask()
452 int __bch2_dev_group_set(struct bch_fs *c, struct bch_dev *ca, const char *name) in __bch2_dev_group_set()
472 int bch2_dev_group_set(struct bch_fs *c, struct bch_dev *ca, const char *name) in bch2_dev_group_set()
487 struct bch_dev *ca; in bch2_opt_target_parse()
532 struct bch_dev *ca = t.dev < c->sb.nr_devices in bch2_target_to_text()
A Dbcachefs.h307 struct bch_dev *: ((struct bch_dev *) (_c))->fs, \
594 struct bch_dev { struct
821 struct bch_dev __rcu *devs[BCH_SB_MEMBERS_MAX];
1195 static inline unsigned bucket_bytes(const struct bch_dev *ca) in bucket_bytes()
1279 static inline bool bch2_discard_opt_enabled(struct bch_fs *c, struct bch_dev *ca) in bch2_discard_opt_enabled()
A Dopts.h638 struct bch_dev;
639 bool bch2_opt_set_sb(struct bch_fs *, struct bch_dev *, const struct bch_option *, u64);
656 int bch2_opt_hook_pre_set(struct bch_fs *, struct bch_dev *, enum bch_opt_id, u64);
658 void bch2_opt_hook_post_set(struct bch_fs *, struct bch_dev *, u64,
A Djournal_sb.h24 int bch2_journal_buckets_to_sb(struct bch_fs *, struct bch_dev *, u64 *, unsigned);
A Djournal_io.c54 struct bch_dev *ca = bch2_dev_tryget_noerror(c, p->dev); in bch2_journal_ptr_to_text()
152 static int journal_entry_add(struct bch_fs *c, struct bch_dev *ca, in journal_entry_add()
923 struct bch_dev *ca, in jset_validate()
977 struct bch_dev *ca, in jset_validate_early()
1046 static int journal_read_bucket(struct bch_dev *ca, in journal_read_bucket()
1201 struct bch_dev *ca = container_of(ja, struct bch_dev, journal); in CLOSURE_CALLBACK()
1539 struct bch_dev *ca = rcu_dereference(c->devs[*i]); in journal_advance_devs_to_next_bucket()
1571 struct bch_dev *ca = bch2_dev_get_ioref(c, *i, WRITE, in __journal_write_alloc()
1827 struct bch_dev *ca = jbio->ca; in journal_write_endio()
1858 struct bch_dev *ca = bch2_dev_have_ref(c, ptr->dev); in CLOSURE_CALLBACK()
[all …]
A Dsb-members.c38 void bch2_dev_bucket_missing(struct bch_dev *ca, u64 bucket) in bch2_dev_bucket_missing()
416 void bch2_dev_io_errors_to_text(struct printbuf *out, struct bch_dev *ca) in bch2_dev_io_errors_to_text()
447 void bch2_dev_errors_reset(struct bch_dev *ca) in bch2_dev_errors_reset()
473 struct bch_dev *ca = bch2_dev_rcu(c, ptr->dev); in bch2_dev_btree_bitmap_marked()
A Dec.c106 struct bch_dev *ca;
188 struct bch_dev *ca, in __mark_stripe_bucket()
295 struct bch_dev *ca = bch2_dev_tryget(c, ptr->dev); in mark_stripe_bucket()
633 struct bch_dev *ca = bch2_dev_tryget(c, v->ptrs[i].dev); in ec_validate_checksums()
702 struct bch_dev *ca = ec_bio->ca; in ec_block_endio()
1101 struct bch_dev *ca, in ec_stripe_update_extent()
1197 struct bch_dev *ca = bch2_dev_tryget(c, ptr.dev); in ec_stripe_update_bucket()
1257 struct bch_dev *ca = bch2_dev_get_ioref(c, ob->dev, WRITE, in zero_out_rest_of_ec_bucket()
1474 struct bch_dev *ca = ob_dev(c, ob); in bch2_writepoint_ec_buf()
2151 struct bch_dev *ca = bch2_dev_rcu(c, ptr->dev); in bch2_invalidate_stripe_to_dev()
[all …]
A Dio_read.c54 struct bch_dev *ca; in bch2_target_congested()
424 struct bch_dev *ca = bch2_dev_have_ref(rbio->c, rbio->pick.ptr.dev); in bch2_rbio_free()
771 struct bch_dev *ca = rbio->have_ioref ? bch2_dev_have_ref(c, rbio->pick.ptr.dev) : NULL; in bch2_read_decompress_err()
791 struct bch_dev *ca = rbio->have_ioref ? bch2_dev_have_ref(c, rbio->pick.ptr.dev) : NULL; in bch2_read_decrypt_err()
807 struct bch_dev *ca = rbio->have_ioref ? bch2_dev_have_ref(c, rbio->pick.ptr.dev) : NULL; in __bch2_read_endio()
936 struct bch_dev *ca = rbio->have_ioref ? bch2_dev_have_ref(c, rbio->pick.ptr.dev) : NULL; in bch2_read_endio()
974 struct bch_dev *ca, in read_from_stale_dirty_pointer()
1092 struct bch_dev *ca = bch2_dev_get_ioref(c, pick.ptr.dev, READ, in __bch2_read_extent()

Completed in 677 milliseconds

12