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