Lines Matching refs:ca

626 			      struct bch_dev *ca,  in sysfs_opt_show()  argument
636 v = bch2_opt_from_sb(c->disk_sb.sb, id, ca->dev_idx); in sysfs_opt_show()
647 struct bch_dev *ca, in sysfs_opt_store() argument
669 bch2_opt_hook_pre_set(c, ca, id, v); in sysfs_opt_store()
679 changed = bch2_opt_set_sb(c, ca, opt, v); in sysfs_opt_store()
680 } else if (!ca) { in sysfs_opt_store()
688 if (!ca) in sysfs_opt_store()
692 bch2_opt_hook_post_set(c, ca, 0, &c->opts, id); 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() argument
793 percpu_u64_get(&ca->io_done->sectors[rw][i]) << 9); in dev_io_done_to_text()
799 struct bch_dev *ca = container_of(kobj, struct bch_dev, kobj); in SHOW() local
800 struct bch_fs *c = ca->fs; in SHOW()
802 sysfs_printf(uuid, "%pU\n", ca->uuid.b); in SHOW()
804 sysfs_print(first_bucket, ca->mi.first_bucket); in SHOW()
805 sysfs_print(nbuckets, ca->mi.nbuckets); in SHOW()
808 if (ca->mi.group) in SHOW()
809 bch2_disk_path_to_text(out, c, ca->mi.group - 1); in SHOW()
814 prt_bitflags(out, __bch2_data_types, bch2_dev_has_data(c, ca)); in SHOW()
819 dev_io_done_to_text(out, ca); in SHOW()
822 bch2_dev_io_errors_to_text(out, ca); in SHOW()
824 sysfs_print(io_latency_read, atomic64_read(&ca->cur_latency[READ])); in SHOW()
825 sysfs_print(io_latency_write, atomic64_read(&ca->cur_latency[WRITE])); in SHOW()
828 bch2_time_stats_to_text(out, &ca->io_latency[READ].stats); in SHOW()
831 bch2_time_stats_to_text(out, &ca->io_latency[WRITE].stats); in SHOW()
834 clamp(atomic_read(&ca->congested), 0, CONGESTED_MAX) in SHOW()
838 bch2_dev_alloc_debug_to_text(out, ca); in SHOW()
841 bch2_open_buckets_to_text(out, c, ca); in SHOW()
845 return sysfs_opt_show(c, ca, opt_id, out); in SHOW()
848 enumerated_ref_to_text(out, &ca->io_ref[READ], bch2_dev_read_refs); in SHOW()
851 enumerated_ref_to_text(out, &ca->io_ref[WRITE], bch2_dev_write_refs); in SHOW()
858 struct bch_dev *ca = container_of(kobj, struct bch_dev, kobj); in STORE() local
859 struct bch_fs *c = ca->fs; in STORE()
869 ret = bch2_dev_group_set(c, ca, strim(tmp)); in STORE()
876 bch2_dev_errors_reset(ca); in STORE()
880 return sysfs_opt_store(c, ca, opt_id, buf, size); in STORE()