diff options
author | Bob Peterson <rpeterso@redhat.com> | 2018-10-04 18:21:07 +0300 |
---|---|---|
committer | Bob Peterson <rpeterso@redhat.com> | 2018-10-05 18:51:11 +0300 |
commit | b524abcc01483b2ac093cc6a8a2a7375558d2b64 (patch) | |
tree | 125fe18370d8aa5a59df22e167ed5b8efe1cf1f0 /fs/gfs2/util.c | |
parent | 4f36cb36c9d14340bb200d2ad9117b03ce992cfe (diff) | |
download | linux-b524abcc01483b2ac093cc6a8a2a7375558d2b64.tar.xz |
gfs2: slow the deluge of io error messages
When an io error is hit, it calls gfs2_io_error_bh_i for every
journal buffer it can't write. Since we changed gfs2_io_error_bh_i
recently to withdraw later in the cycle, it sends a flood of
errors to the console. This patch checks for the file system already
being withdrawn, and if so, doesn't send more messages. It doesn't
stop the flood of messages, but it slows it down and keeps it more
reasonable.
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Diffstat (limited to 'fs/gfs2/util.c')
-rw-r--r-- | fs/gfs2/util.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/gfs2/util.c b/fs/gfs2/util.c index b072b10fb635..0a814ccac41d 100644 --- a/fs/gfs2/util.c +++ b/fs/gfs2/util.c @@ -259,12 +259,13 @@ void gfs2_io_error_bh_i(struct gfs2_sbd *sdp, struct buffer_head *bh, const char *function, char *file, unsigned int line, bool withdraw) { - fs_err(sdp, - "fatal: I/O error\n" - " block = %llu\n" - " function = %s, file = %s, line = %u\n", - (unsigned long long)bh->b_blocknr, - function, file, line); + if (!test_bit(SDF_SHUTDOWN, &sdp->sd_flags)) + fs_err(sdp, + "fatal: I/O error\n" + " block = %llu\n" + " function = %s, file = %s, line = %u\n", + (unsigned long long)bh->b_blocknr, + function, file, line); if (withdraw) gfs2_lm_withdraw(sdp, NULL); } |