Lines Matching refs:ctrs
21 static size_t bch2_sb_counter_nr_entries(struct bch_sb_field_counters *ctrs) in bch2_sb_counter_nr_entries() argument
23 if (!ctrs) in bch2_sb_counter_nr_entries()
26 return (__le64 *) vstruct_end(&ctrs->field) - &ctrs->d[0]; in bch2_sb_counter_nr_entries()
38 struct bch_sb_field_counters *ctrs = field_to_type(f, counters); in bch2_sb_counters_to_text() local
39 unsigned int nr = bch2_sb_counter_nr_entries(ctrs); in bch2_sb_counters_to_text()
46 le64_to_cpu(ctrs->d[stable])); in bch2_sb_counters_to_text()
52 struct bch_sb_field_counters *ctrs = bch2_sb_field_get(c->disk_sb.sb, counters); in bch2_sb_counters_to_cpu() local
53 unsigned int nr = bch2_sb_counter_nr_entries(ctrs); in bch2_sb_counters_to_cpu()
61 u64 v = le64_to_cpu(ctrs->d[stable]); in bch2_sb_counters_to_cpu()
72 struct bch_sb_field_counters *ctrs = bch2_sb_field_get(c->disk_sb.sb, counters); in bch2_sb_counters_from_cpu() local
74 unsigned int nr = bch2_sb_counter_nr_entries(ctrs); in bch2_sb_counters_from_cpu()
78 sizeof(*ctrs) / sizeof(u64) + BCH_COUNTER_NR); in bch2_sb_counters_from_cpu()
80 ctrs = ret; in bch2_sb_counters_from_cpu()
81 nr = bch2_sb_counter_nr_entries(ctrs); in bch2_sb_counters_from_cpu()
88 ctrs->d[stable] = cpu_to_le64(percpu_u64_get(&c->counters[i])); in bch2_sb_counters_from_cpu()