Lines Matching refs:i
36 unsigned i, nr = bch2_sb_field_errors_nr_entries(e); in bch2_sb_errors_validate() local
38 for (i = 0; i < nr; i++) { in bch2_sb_errors_validate()
39 if (!BCH_SB_ERROR_ENTRY_NR(&e->entries[i])) { in bch2_sb_errors_validate()
41 bch2_sb_error_id_to_text(err, BCH_SB_ERROR_ENTRY_ID(&e->entries[i])); in bch2_sb_errors_validate()
46 if (i + 1 < nr && in bch2_sb_errors_validate()
47 BCH_SB_ERROR_ENTRY_ID(&e->entries[i]) >= in bch2_sb_errors_validate()
48 BCH_SB_ERROR_ENTRY_ID(&e->entries[i + 1])) { in bch2_sb_errors_validate()
61 unsigned i, nr = bch2_sb_field_errors_nr_entries(e); in bch2_sb_errors_to_text() local
66 for (i = 0; i < nr; i++) { in bch2_sb_errors_to_text()
67 bch2_sb_error_id_to_text(out, BCH_SB_ERROR_ENTRY_ID(&e->entries[i])); in bch2_sb_errors_to_text()
69 prt_u64(out, BCH_SB_ERROR_ENTRY_NR(&e->entries[i])); in bch2_sb_errors_to_text()
71 bch2_prt_datetime(out, le64_to_cpu(e->entries[i].last_error_time)); in bch2_sb_errors_to_text()
93 darray_for_each(*e, i) { in bch2_fs_errors_to_text()
94 bch2_sb_error_id_to_text(out, i->id); in bch2_fs_errors_to_text()
96 prt_u64(out, i->nr); in bch2_fs_errors_to_text()
98 bch2_prt_datetime(out, i->last_error_time); in bch2_fs_errors_to_text()
111 unsigned i; in bch2_sb_error_count() local
114 for (i = 0; i < e->nr; i++) { in bch2_sb_error_count()
115 if (err == e->data[i].id) { in bch2_sb_error_count()
116 e->data[i].nr++; in bch2_sb_error_count()
117 e->data[i].last_error_time = n.last_error_time; in bch2_sb_error_count()
120 if (err < e->data[i].id) in bch2_sb_error_count()
127 darray_insert_item(e, i, n); in bch2_sb_error_count()
136 unsigned i; in bch2_sb_errors_from_cpu() local
146 for (i = 0; i < src->nr; i++) { in bch2_sb_errors_from_cpu()
147 SET_BCH_SB_ERROR_ENTRY_ID(&dst->entries[i], src->data[i].id); in bch2_sb_errors_from_cpu()
148 SET_BCH_SB_ERROR_ENTRY_NR(&dst->entries[i], src->data[i].nr); in bch2_sb_errors_from_cpu()
149 dst->entries[i].last_error_time = cpu_to_le64(src->data[i].last_error_time); in bch2_sb_errors_from_cpu()
160 unsigned i, nr = bch2_sb_field_errors_nr_entries(src); in bch2_sb_errors_to_cpu() local
173 for (i = 0; i < nr; i++) { in bch2_sb_errors_to_cpu()
174 dst->data[i].id = BCH_SB_ERROR_ENTRY_ID(&src->entries[i]); in bch2_sb_errors_to_cpu()
175 dst->data[i].nr = BCH_SB_ERROR_ENTRY_NR(&src->entries[i]); in bch2_sb_errors_to_cpu()
176 dst->data[i].last_error_time = le64_to_cpu(src->entries[i].last_error_time); in bch2_sb_errors_to_cpu()