Lines Matching defs:ca
81 void bch_count_io_errors(struct cache *ca,
91 if (ca->set->error_decay) {
92 unsigned int count = atomic_inc_return(&ca->io_count);
94 while (count > ca->set->error_decay) {
97 unsigned int new = count - ca->set->error_decay;
104 count = atomic_cmpxchg(&ca->io_count, old, new);
109 errors = atomic_read(&ca->io_errors);
113 errors = atomic_cmpxchg(&ca->io_errors,
122 &ca->io_errors);
125 if (errors < ca->set->error_limit)
127 ca->cache_dev_name, m,
130 bch_cache_set_error(ca->set,
132 ca->cache_dev_name, m);
140 struct cache *ca = PTR_CACHE(c, &b->key, 0);
163 bch_count_io_errors(ca, error, is_read, m);