提交 0009fad0 编写于 作者: N Nigel Croxon 提交者: Song Liu

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: NNigel Croxon <ncroxon@redhat.com>
Signed-off-by: NSong Liu <songliubraving@fb.com>
上级 9d4b45d6
...@@ -2549,10 +2549,16 @@ static void raid5_end_read_request(struct bio * bi) ...@@ -2549,10 +2549,16 @@ static void raid5_end_read_request(struct bio * bi)
(unsigned long long)s, (unsigned long long)s,
bdn); bdn);
} else if (atomic_read(&rdev->read_errors) } else if (atomic_read(&rdev->read_errors)
> conf->max_nr_stripes) > conf->max_nr_stripes) {
pr_warn("md/raid:%s: Too many read errors, failing device %s.\n", if (!test_bit(Faulty, &rdev->flags)) {
mdname(conf->mddev), bdn); pr_warn("md/raid:%s: %d read_errors > %d stripes\n",
else 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; retry = 1;
if (set_bad && test_bit(In_sync, &rdev->flags) if (set_bad && test_bit(In_sync, &rdev->flags)
&& !test_bit(R5_ReadNoMerge, &sh->dev[i].flags)) && !test_bit(R5_ReadNoMerge, &sh->dev[i].flags))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册