Lines Matching refs:ca

39 static inline struct bpos bp_pos_to_bucket(const struct bch_dev *ca, struct bpos bp_pos)  in bp_pos_to_bucket()  argument
43 return POS(bp_pos.inode, sector_to_bucket(ca, bucket_sector)); 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() argument
51 return POS(bp_pos.inode, sector_to_bucket_and_offset(ca, bucket_sector, bucket_offset)); 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() local
58 if (ca) in bp_pos_to_bucket_nodev_noerror()
59 *bucket = bp_pos_to_bucket(ca, bp_pos); in bp_pos_to_bucket_nodev_noerror()
60 return ca != NULL; 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() argument
68 (bucket_to_sector(ca, bucket.offset) << 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() argument
79 struct bpos ret = bucket_pos_to_bp_noerror(ca, bucket, bucket_offset); in bucket_pos_to_bp()
80 EBUG_ON(!bkey_eq(bucket, bp_pos_to_bucket(ca, ret))); 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() argument
86 return bucket_pos_to_bp(ca, bucket, 0); 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() argument
91 return bpos_nosnap_predecessor(bucket_pos_to_bp(ca, bpos_nosnap_successor(bucket), 0)); in bucket_pos_to_bp_end()