Lines Matching refs:bch_dev

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()
126 static inline struct bpos PTR_BUCKET_POS(const struct bch_dev *ca, in PTR_BUCKET_POS()
132 static inline struct bpos PTR_BUCKET_POS_OFFSET(const struct bch_dev *ca, in PTR_BUCKET_POS_OFFSET()
139 static inline struct bucket *PTR_GC_BUCKET(struct bch_dev *ca, in PTR_GC_BUCKET()
176 static inline int dev_ptr_stale_rcu(struct bch_dev *ca, const struct bch_extent_ptr *ptr) in dev_ptr_stale_rcu()
186 static inline int dev_ptr_stale(struct bch_dev *ca, const struct bch_extent_ptr *ptr) in dev_ptr_stale()
196 void bch2_dev_usage_read_fast(struct bch_dev *, struct bch_dev_usage *);
197 static inline struct bch_dev_usage bch2_dev_usage_read(struct bch_dev *ca) in bch2_dev_usage_read()
205 void bch2_dev_usage_to_text(struct printbuf *, struct bch_dev *, struct bch_dev_usage *);
207 static inline u64 bch2_dev_buckets_reserved(struct bch_dev *ca, enum bch_watermark watermark) in bch2_dev_buckets_reserved()
235 static inline u64 dev_buckets_free(struct bch_dev *ca, in dev_buckets_free()
245 static inline u64 __dev_buckets_available(struct bch_dev *ca, in __dev_buckets_available()
258 static inline u64 dev_buckets_available(struct bch_dev *ca, in dev_buckets_available()
274 int bch2_bucket_ref_update(struct btree_trans *, struct bch_dev *,
302 int bch2_trans_mark_metadata_bucket(struct btree_trans *, struct bch_dev *, u64,
305 int bch2_trans_mark_dev_sb(struct bch_fs *, struct bch_dev *,
311 static inline bool is_superblock_bucket(struct bch_dev *ca, u64 b) in is_superblock_bucket()
413 int bch2_dev_buckets_resize(struct bch_fs *, struct bch_dev *, u64);
414 void bch2_dev_buckets_free(struct bch_dev *);
415 int bch2_dev_buckets_alloc(struct bch_fs *, struct bch_dev *);