Lines Matching defs:ca
82 void bch_count_io_errors(struct cache *ca,
92 if (ca->set->error_decay) {
93 unsigned int count = atomic_inc_return(&ca->io_count);
95 while (count > ca->set->error_decay) {
98 unsigned int new = count - ca->set->error_decay;
105 count = atomic_cmpxchg(&ca->io_count, old, new);
110 errors = atomic_read(&ca->io_errors);
114 errors = atomic_cmpxchg(&ca->io_errors,
123 &ca->io_errors);
126 if (errors < ca->set->error_limit)
128 ca->bdev, m,
131 bch_cache_set_error(ca->set,
133 ca->bdev, m);
141 struct cache *ca = c->cache;
164 bch_count_io_errors(ca, error, is_read, m);