|
@@ -367,6 +367,7 @@ struct cached_dev {
|
|
|
unsigned sequential_cutoff;
|
|
unsigned sequential_cutoff;
|
|
|
unsigned readahead;
|
|
unsigned readahead;
|
|
|
|
|
|
|
|
|
|
+ unsigned io_disable:1;
|
|
|
unsigned verify:1;
|
|
unsigned verify:1;
|
|
|
unsigned bypass_torture_test:1;
|
|
unsigned bypass_torture_test:1;
|
|
|
|
|
|
|
@@ -388,6 +389,9 @@ struct cached_dev {
|
|
|
unsigned writeback_rate_minimum;
|
|
unsigned writeback_rate_minimum;
|
|
|
|
|
|
|
|
enum stop_on_failure stop_when_cache_set_failed;
|
|
enum stop_on_failure stop_when_cache_set_failed;
|
|
|
|
|
+#define DEFAULT_CACHED_DEV_ERROR_LIMIT 64
|
|
|
|
|
+ atomic_t io_errors;
|
|
|
|
|
+ unsigned error_limit;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
enum alloc_reserve {
|
|
enum alloc_reserve {
|
|
@@ -911,6 +915,7 @@ static inline void wait_for_kthread_stop(void)
|
|
|
|
|
|
|
|
/* Forward declarations */
|
|
/* Forward declarations */
|
|
|
|
|
|
|
|
|
|
+void bch_count_backing_io_errors(struct cached_dev *dc, struct bio *bio);
|
|
|
void bch_count_io_errors(struct cache *, blk_status_t, int, const char *);
|
|
void bch_count_io_errors(struct cache *, blk_status_t, int, const char *);
|
|
|
void bch_bbio_count_io_errors(struct cache_set *, struct bio *,
|
|
void bch_bbio_count_io_errors(struct cache_set *, struct bio *,
|
|
|
blk_status_t, const char *);
|
|
blk_status_t, const char *);
|
|
@@ -938,6 +943,7 @@ int bch_bucket_alloc_set(struct cache_set *, unsigned,
|
|
|
struct bkey *, int, bool);
|
|
struct bkey *, int, bool);
|
|
|
bool bch_alloc_sectors(struct cache_set *, struct bkey *, unsigned,
|
|
bool bch_alloc_sectors(struct cache_set *, struct bkey *, unsigned,
|
|
|
unsigned, unsigned, bool);
|
|
unsigned, unsigned, bool);
|
|
|
|
|
+bool bch_cached_dev_error(struct cached_dev *dc);
|
|
|
|
|
|
|
|
__printf(2, 3)
|
|
__printf(2, 3)
|
|
|
bool bch_cache_set_error(struct cache_set *, const char *, ...);
|
|
bool bch_cache_set_error(struct cache_set *, const char *, ...);
|