提交 bdfc230f 编写于 作者: N Nikitas Angelinas 提交者: Theodore Ts'o

ext4: MMP: fix error message rate-limiting logic in kmmpd

Current logic would print an error message only once, and then
'failed_writes' would stay at 1.  Rework the loop to increment
'failed_writes' and print the error message every
s_mmp_update_interval * 60 seconds, as intended according to the
comment.
Signed-off-by: NNikitas Angelinas <nikitas_angelinas@xyratex.com>
Signed-off-by: NAndrew Perepechko <andrew_perepechko@xyratex.com>
Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
Acked-by: NAndreas Dilger <adilger@dilger.ca>
上级 215fc6af
......@@ -125,8 +125,9 @@ static int kmmpd(void *data)
* Don't spew too many error messages. Print one every
* (s_mmp_update_interval * 60) seconds.
*/
if (retval && (failed_writes % 60) == 0) {
ext4_error(sb, "Error writing to MMP block");
if (retval) {
if ((failed_writes % 60) == 0)
ext4_error(sb, "Error writing to MMP block");
failed_writes++;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册