Skip to content

Commit 0009fad

Browse files
ncroxonliu-song-6
authored andcommitted
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>
1 parent 9d4b45d commit 0009fad

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

‎drivers/md/raid5.c‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2549,10 +2549,16 @@ static void raid5_end_read_request(struct bio * bi)
25492549
(unsigned long long)s,
25502550
bdn);
25512551
} else if (atomic_read(&rdev->read_errors)
2552-
> conf->max_nr_stripes)
2553-
pr_warn("md/raid:%s: Too many read errors, failing device %s.\n",
2554-
mdname(conf->mddev), bdn);
2555-
else
2552+
> conf->max_nr_stripes) {
2553+
if (!test_bit(Faulty, &rdev->flags)) {
2554+
pr_warn("md/raid:%s: %d read_errors > %d stripes\n",
2555+
mdname(conf->mddev),
2556+
atomic_read(&rdev->read_errors),
2557+
conf->max_nr_stripes);
2558+
pr_warn("md/raid:%s: Too many read errors, failing device %s.\n",
2559+
mdname(conf->mddev), bdn);
2560+
}
2561+
} else
25562562
retry = 1;
25572563
if (set_bad && test_bit(In_sync, &rdev->flags)
25582564
&& !test_bit(R5_ReadNoMerge, &sh->dev[i].flags))

0 commit comments

Comments
 (0)