Lines Matching defs:ja

987 	struct journal_device *ja = &ca->journal;
990 u64 offset = bucket_to_sector(ca, ja->buckets[bucket]),
1066 if (le64_to_cpu(j->seq) < ja->bucket_seq[bucket])
1069 ja->bucket_seq[bucket] = le64_to_cpu(j->seq);
1094 bucket_to_sector(ca, ja->buckets[bucket]),
1123 closure_type(ja, struct journal_device, read);
1124 struct bch_dev *ca = container_of(ja, struct bch_dev, journal);
1134 if (!ja->nr)
1141 pr_debug("%u journal buckets", ja->nr);
1143 for (i = 0; i < ja->nr; i++) {
1149 ja->sectors_free = ca->mi.bucket_size;
1163 ja->cur_idx = i->bucket;
1164 ja->sectors_free = ca->mi.bucket_size - wrote;
1171 if (ja->bucket_seq[ja->cur_idx] &&
1172 ja->sectors_free == ca->mi.bucket_size) {
1179 bch_err(c, "ja->sectors_free == ca->mi.bucket_size");
1180 bch_err(c, "cur_idx %u/%u", ja->cur_idx, ja->nr);
1182 unsigned idx = (ja->cur_idx + ja->nr - 1 + i) % ja->nr;
1184 bch_err(c, "bucket_seq[%u] = %llu", idx, ja->bucket_seq[idx]);
1187 ja->sectors_free = 0;
1195 ja->discard_idx = ja->dirty_idx_ondisk =
1196 ja->dirty_idx = (ja->cur_idx + 1) % ja->nr;
1445 struct journal_device *ja;
1457 ja = &ca->journal;
1465 !ja->nr ||
1467 sectors > ja->sectors_free)
1475 ja->buckets[ja->cur_idx]) +
1477 ja->sectors_free,
1481 ja->sectors_free -= sectors;
1482 ja->bucket_seq[ja->cur_idx] = le64_to_cpu(w->data->seq);
1503 struct journal_device *ja;
1531 ja = &ca->journal;
1533 if (sectors > ja->sectors_free &&
1535 bch2_journal_dev_buckets_available(j, ja,
1537 ja->cur_idx = (ja->cur_idx + 1) % ja->nr;
1538 ja->sectors_free = ca->mi.bucket_size;
1541 * ja->bucket_seq[ja->cur_idx] must always have
1544 ja->bucket_seq[ja->cur_idx] = le64_to_cpu(w->data->seq);
1735 struct journal_device *ja = &ca->journal;
1746 struct bio *bio = &ja->bio[w->idx]->bio;
1765 ja->bucket_seq[ja->cur_idx] = le64_to_cpu(w->data->seq);
1790 struct journal_device *ja = &ca->journal;
1791 struct bio *bio = &ja->bio[w->idx]->bio;