diff options
-rw-r--r-- | fs/btrfs/volumes.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 14436074350..b8708f994e6 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c | |||
@@ -4884,6 +4884,14 @@ void btrfs_dev_stat_print_on_error(struct btrfs_device *dev) | |||
4884 | 4884 | ||
4885 | static void btrfs_dev_stat_print_on_load(struct btrfs_device *dev) | 4885 | static void btrfs_dev_stat_print_on_load(struct btrfs_device *dev) |
4886 | { | 4886 | { |
4887 | int i; | ||
4888 | |||
4889 | for (i = 0; i < BTRFS_DEV_STAT_VALUES_MAX; i++) | ||
4890 | if (btrfs_dev_stat_read(dev, i) != 0) | ||
4891 | break; | ||
4892 | if (i == BTRFS_DEV_STAT_VALUES_MAX) | ||
4893 | return; /* all values == 0, suppress message */ | ||
4894 | |||
4887 | printk_in_rcu(KERN_INFO "btrfs: bdev %s errs: wr %u, rd %u, flush %u, corrupt %u, gen %u\n", | 4895 | printk_in_rcu(KERN_INFO "btrfs: bdev %s errs: wr %u, rd %u, flush %u, corrupt %u, gen %u\n", |
4888 | rcu_str_deref(dev->name), | 4896 | rcu_str_deref(dev->name), |
4889 | btrfs_dev_stat_read(dev, BTRFS_DEV_STAT_WRITE_ERRS), | 4897 | btrfs_dev_stat_read(dev, BTRFS_DEV_STAT_WRITE_ERRS), |