Lines Matching refs:ca
154 void bch_count_io_errors(struct cache *ca, int error, const char *m) in bch_count_io_errors() argument
161 if (ca->set->error_decay) { in bch_count_io_errors()
162 unsigned count = atomic_inc_return(&ca->io_count); in bch_count_io_errors()
164 while (count > ca->set->error_decay) { in bch_count_io_errors()
167 unsigned new = count - ca->set->error_decay; in bch_count_io_errors()
174 count = atomic_cmpxchg(&ca->io_count, old, new); in bch_count_io_errors()
179 errors = atomic_read(&ca->io_errors); in bch_count_io_errors()
183 errors = atomic_cmpxchg(&ca->io_errors, in bch_count_io_errors()
193 &ca->io_errors); in bch_count_io_errors()
196 if (errors < ca->set->error_limit) in bch_count_io_errors()
198 bdevname(ca->bdev, buf), m); in bch_count_io_errors()
200 bch_cache_set_error(ca->set, in bch_count_io_errors()
202 bdevname(ca->bdev, buf), m); in bch_count_io_errors()
210 struct cache *ca = PTR_CACHE(c, &b->key, 0); in bch_bbio_count_io_errors() local
232 bch_count_io_errors(ca, error, m); in bch_bbio_count_io_errors()