diff options
author | Nigel Croxon <ncroxon@redhat.com> | 2019-08-21 09:27:08 -0400 |
---|---|---|
committer | Song Liu <songliubraving@fb.com> | 2019-08-27 12:36:37 -0700 |
commit | 0009fad033370802de75e4cedab54f4d86450e22 (patch) | |
tree | 240fe4ea5f6a2372b511c7aa934bdd13306131fd /drivers/md | |
parent | 9d4b45d6af442237560d0bb5502a012baa5234b7 (diff) | |
download | linux-0009fad033370802de75e4cedab54f4d86450e22.tar.bz2 |
raid5 improve too many read errors msg by adding limits
Often limits can be changed by admin. When discussing such things
it helps if you can provide "self-sustained" facts. Also
sometimes the admin thinks he changed a limit, but it did not
take effect for some reason or he changed the wrong thing.
V3: Only pr_warn when Faulty is 0.
V2: Add read_errors value to pr_warn.
Signed-off-by: Nigel Croxon <ncroxon@redhat.com>
Signed-off-by: Song Liu <songliubraving@fb.com>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/raid5.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 59cafafd5a5d..88e56ee98976 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -2549,10 +2549,16 @@ static void raid5_end_read_request(struct bio * bi) (unsigned long long)s, bdn); } else if (atomic_read(&rdev->read_errors) - > conf->max_nr_stripes) - pr_warn("md/raid:%s: Too many read errors, failing device %s.\n", - mdname(conf->mddev), bdn); - else + > conf->max_nr_stripes) { + if (!test_bit(Faulty, &rdev->flags)) { + pr_warn("md/raid:%s: %d read_errors > %d stripes\n", + mdname(conf->mddev), + atomic_read(&rdev->read_errors), + conf->max_nr_stripes); + pr_warn("md/raid:%s: Too many read errors, failing device %s.\n", + mdname(conf->mddev), bdn); + } + } else retry = 1; if (set_bad && test_bit(In_sync, &rdev->flags) && !test_bit(R5_ReadNoMerge, &sh->dev[i].flags)) |