Lines Matching refs:ca

101 	struct bch_dev		*ca;
167 struct bch_dev *ca,
244 ret = bch2_bucket_ref_update(trans, ca, s.s_c, ptr, sectors, data_type,
273 struct bch_dev *ca = bch2_dev_tryget(c, ptr->dev);
274 if (unlikely(!ca)) {
280 struct bpos bucket = PTR_BUCKET_POS(ca, ptr);
286 __mark_stripe_bucket(trans, ca, s, ptr_idx, deleting, bucket, &a->v, flags);
291 struct bucket *g = gc_bucket(ca, bucket.offset);
294 ret = __mark_stripe_bucket(trans, ca, s, ptr_idx, deleting, bucket, &new, flags);
297 bch2_dev_usage_update(c, ca, &old, &new, 0, true);
303 bch2_dev_put(ca);
636 struct bch_dev *ca = bch2_dev_tryget(c, v->ptrs[i].dev);
637 if (ca) {
644 bch_err_ratelimited(ca, "%s", err.buf);
647 bch2_io_error(ca, BCH_MEMBER_ERROR_checksum);
705 struct bch_dev *ca = ec_bio->ca;
708 if (bch2_dev_io_err_on(bio->bi_status, ca,
717 if (dev_ptr_stale(ca, ptr)) {
718 bch_err_ratelimited(ca->fs,
725 percpu_ref_put(&ca->io_ref);
740 struct bch_dev *ca = bch2_dev_get_ioref(c, ptr->dev, rw);
741 if (!ca) {
746 if (dev_ptr_stale(ca, ptr)) {
755 this_cpu_add(ca->io_done->sectors[rw][data_type], buf->size);
764 ec_bio = container_of(bio_alloc_bioset(ca->disk_sb.bdev,
771 ec_bio->ca = ca;
782 percpu_ref_get(&ca->io_ref);
789 percpu_ref_put(&ca->io_ref);
1204 struct bch_dev *ca,
1220 ret = bch2_get_next_backpointer(trans, ca, bucket, gen,
1308 struct bch_dev *ca = bch2_dev_tryget(c, ptr.dev);
1309 if (!ca)
1312 struct bpos bucket_pos = PTR_BUCKET_POS(ca, &ptr);
1318 ec_stripe_update_extent(trans, ca, bucket_pos, ptr.gen, s, &bp_pos));
1327 bch2_dev_put(ca);
1358 struct bch_dev *ca = bch2_dev_get_ioref(c, ob->dev, WRITE);
1359 if (!ca) {
1364 unsigned offset = ca->mi.bucket_size - ob->sectors_free;
1369 int ret = blkdev_issue_zeroout(ca->disk_sb.bdev,
1370 ob->bucket * ca->mi.bucket_size + offset,
1374 percpu_ref_put(&ca->io_ref);
1559 struct bch_dev *ca = ob_dev(c, ob);
1560 unsigned offset = ca->mi.bucket_size - ob->sectors_free;
1582 for_each_member_device_rcu(c, ca, devs)
1583 sizes[nr++] = ca->mi.bucket_size;
1686 for_each_member_device_rcu(c, ca, &h->devs)
1687 if (!ca->mi.durability)
1688 __clear_bit(ca->dev_idx, h->devs.d);
1692 for_each_member_device_rcu(c, ca, &h->devs)
1693 if (ca->mi.bucket_size == h->blocksize)
2096 static void __bch2_ec_stop(struct bch_fs *c, struct bch_dev *ca)
2108 if (!ca)
2116 if (ob->dev == ca->dev_idx)
2129 void bch2_ec_stop_dev(struct bch_fs *c, struct bch_dev *ca)
2131 __bch2_ec_stop(c, ca);