diff options
author | Nikitas Angelinas <nikitasangelinas@gmail.com> | 2011-10-18 10:51:51 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2011-10-18 10:51:51 -0400 |
commit | bdfc230f33a9dab316dcb6be4696ae59e1562e3c (patch) | |
tree | 6e5d3d17ed45f78b6597c42648cd57e0b4520103 /fs/ext4/mmp.c | |
parent | 215fc6af739d2dfdcad5496248d0d6302eb8a604 (diff) | |
download | linux-bdfc230f33a9dab316dcb6be4696ae59e1562e3c.tar.gz linux-bdfc230f33a9dab316dcb6be4696ae59e1562e3c.tar.bz2 linux-bdfc230f33a9dab316dcb6be4696ae59e1562e3c.zip |
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: Nikitas Angelinas <nikitas_angelinas@xyratex.com>
Signed-off-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Acked-by: Andreas Dilger <adilger@dilger.ca>
Diffstat (limited to 'fs/ext4/mmp.c')
-rw-r--r-- | fs/ext4/mmp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/ext4/mmp.c b/fs/ext4/mmp.c index 2fca64efd6db..6b327423e622 100644 --- a/fs/ext4/mmp.c +++ b/fs/ext4/mmp.c @@ -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++; } |