diff options
-rw-r--r-- | drivers/md/bcache/bcache.h | 1 | ||||
-rw-r--r-- | drivers/md/bcache/super.c | 2 | ||||
-rw-r--r-- | drivers/md/bcache/sysfs.c | 4 |
3 files changed, 4 insertions, 3 deletions
diff --git a/drivers/md/bcache/bcache.h b/drivers/md/bcache/bcache.h index a857eb3c10de..b8c2e1bef1f1 100644 --- a/drivers/md/bcache/bcache.h +++ b/drivers/md/bcache/bcache.h | |||
@@ -666,6 +666,7 @@ struct cache_set { | |||
666 | ON_ERROR_UNREGISTER, | 666 | ON_ERROR_UNREGISTER, |
667 | ON_ERROR_PANIC, | 667 | ON_ERROR_PANIC, |
668 | } on_error; | 668 | } on_error; |
669 | #define DEFAULT_IO_ERROR_LIMIT 8 | ||
669 | unsigned error_limit; | 670 | unsigned error_limit; |
670 | unsigned error_decay; | 671 | unsigned error_decay; |
671 | 672 | ||
diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c index 133b81225ea9..e29150ec17e7 100644 --- a/drivers/md/bcache/super.c +++ b/drivers/md/bcache/super.c | |||
@@ -1553,7 +1553,7 @@ struct cache_set *bch_cache_set_alloc(struct cache_sb *sb) | |||
1553 | 1553 | ||
1554 | c->congested_read_threshold_us = 2000; | 1554 | c->congested_read_threshold_us = 2000; |
1555 | c->congested_write_threshold_us = 20000; | 1555 | c->congested_write_threshold_us = 20000; |
1556 | c->error_limit = 8 << IO_ERROR_SHIFT; | 1556 | c->error_limit = DEFAULT_IO_ERROR_LIMIT; |
1557 | 1557 | ||
1558 | return c; | 1558 | return c; |
1559 | err: | 1559 | err: |
diff --git a/drivers/md/bcache/sysfs.c b/drivers/md/bcache/sysfs.c index 46e7a6b3e7c7..c524305cc9a7 100644 --- a/drivers/md/bcache/sysfs.c +++ b/drivers/md/bcache/sysfs.c | |||
@@ -568,7 +568,7 @@ SHOW(__bch_cache_set) | |||
568 | 568 | ||
569 | /* See count_io_errors for why 88 */ | 569 | /* See count_io_errors for why 88 */ |
570 | sysfs_print(io_error_halflife, c->error_decay * 88); | 570 | sysfs_print(io_error_halflife, c->error_decay * 88); |
571 | sysfs_print(io_error_limit, c->error_limit >> IO_ERROR_SHIFT); | 571 | sysfs_print(io_error_limit, c->error_limit); |
572 | 572 | ||
573 | sysfs_hprint(congested, | 573 | sysfs_hprint(congested, |
574 | ((uint64_t) bch_get_congested(c)) << 9); | 574 | ((uint64_t) bch_get_congested(c)) << 9); |
@@ -668,7 +668,7 @@ STORE(__bch_cache_set) | |||
668 | } | 668 | } |
669 | 669 | ||
670 | if (attr == &sysfs_io_error_limit) | 670 | if (attr == &sysfs_io_error_limit) |
671 | c->error_limit = strtoul_or_return(buf) << IO_ERROR_SHIFT; | 671 | c->error_limit = strtoul_or_return(buf); |
672 | 672 | ||
673 | /* See count_io_errors() for why 88 */ | 673 | /* See count_io_errors() for why 88 */ |
674 | if (attr == &sysfs_io_error_halflife) | 674 | if (attr == &sysfs_io_error_halflife) |