Lines Matching refs:bch_dev
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()
142 for (struct bch_dev *_ca = NULL; \
145 static inline struct bch_dev *bch2_get_next_online_dev(struct bch_fs *c, in bch2_get_next_online_dev()
146 struct bch_dev *ca, in bch2_get_next_online_dev()
163 for (struct bch_dev *_ca = NULL; \
180 static inline bool bucket_valid(const struct bch_dev *ca, u64 b) in bucket_valid()
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()
210 static inline struct bch_dev *bch2_dev_rcu(struct bch_fs *c, unsigned dev) in bch2_dev_rcu()
212 struct bch_dev *ca = bch2_dev_rcu_noerror(c, dev); in bch2_dev_rcu()
218 static inline struct bch_dev *bch2_dev_tryget_noerror(struct bch_fs *c, unsigned dev) in bch2_dev_tryget_noerror()
221 struct bch_dev *ca = bch2_dev_rcu_noerror(c, dev); in bch2_dev_tryget_noerror()
228 static inline struct bch_dev *bch2_dev_tryget(struct bch_fs *c, unsigned dev) in bch2_dev_tryget()
230 struct bch_dev *ca = bch2_dev_tryget_noerror(c, dev); in bch2_dev_tryget()
236 static inline struct bch_dev *bch2_dev_bucket_tryget_noerror(struct bch_fs *c, struct bpos bucket) in bch2_dev_bucket_tryget_noerror()
238 struct bch_dev *ca = bch2_dev_tryget_noerror(c, bucket.inode); in bch2_dev_bucket_tryget_noerror()
248 static inline struct bch_dev *bch2_dev_bucket_tryget(struct bch_fs *c, struct bpos bucket) in bch2_dev_bucket_tryget()
250 struct bch_dev *ca = bch2_dev_bucket_tryget_noerror(c, bucket); in bch2_dev_bucket_tryget()
256 static inline struct bch_dev *bch2_dev_iterate_noerror(struct bch_fs *c, struct bch_dev *ca, unsign… in bch2_dev_iterate_noerror()
264 static inline struct bch_dev *bch2_dev_iterate(struct bch_fs *c, struct bch_dev *ca, unsigned dev_i… in bch2_dev_iterate()
272 static inline struct bch_dev *bch2_dev_get_ioref(struct bch_fs *c, unsigned dev, int rw) in bch2_dev_get_ioref()
275 struct bch_dev *ca = bch2_dev_rcu(c, dev); in bch2_dev_get_ioref()
344 void bch2_dev_io_errors_to_text(struct printbuf *, struct bch_dev *);
345 void bch2_dev_errors_reset(struct bch_dev *);
347 static inline bool bch2_dev_btree_bitmap_marked_sectors(struct bch_dev *ca, u64 start, unsigned sec… in bch2_dev_btree_bitmap_marked_sectors()