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