Lines Matching refs:ca
56 void bch_count_io_errors(struct cache *ca, int error, const char *m) in bch_count_io_errors() argument
63 if (ca->set->error_decay) { in bch_count_io_errors()
64 unsigned count = atomic_inc_return(&ca->io_count); in bch_count_io_errors()
66 while (count > ca->set->error_decay) { in bch_count_io_errors()
69 unsigned new = count - ca->set->error_decay; in bch_count_io_errors()
76 count = atomic_cmpxchg(&ca->io_count, old, new); in bch_count_io_errors()
81 errors = atomic_read(&ca->io_errors); in bch_count_io_errors()
85 errors = atomic_cmpxchg(&ca->io_errors, in bch_count_io_errors()
95 &ca->io_errors); in bch_count_io_errors()
98 if (errors < ca->set->error_limit) in bch_count_io_errors()
100 bdevname(ca->bdev, buf), m); in bch_count_io_errors()
102 bch_cache_set_error(ca->set, in bch_count_io_errors()
104 bdevname(ca->bdev, buf), m); in bch_count_io_errors()
112 struct cache *ca = PTR_CACHE(c, &b->key, 0); in bch_bbio_count_io_errors() local
134 bch_count_io_errors(ca, error, m); in bch_bbio_count_io_errors()