Commit 4f4d5082 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Greg Kroah-Hartman

xfs: don't print warnings when xfs_log_force fails

commit 84a4620c upstream.

There are only two reasons for xfs_log_force / xfs_log_force_lsn to fail:
one is an I/O error, for which xlog_bdstrat already logs a warning, and
the second is an already shutdown log due to a previous I/O errors.  In
the latter case we'll already have a previous indication for the actual
error, but the large stream of misleading warnings from xfs_log_force
will probably scroll it out of the message buffer.

Simply removing the warnings thus makes the XFS log reporting significantly
better.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarCarlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e9b77651
...@@ -3324,12 +3324,8 @@ xfs_log_force( ...@@ -3324,12 +3324,8 @@ xfs_log_force(
xfs_mount_t *mp, xfs_mount_t *mp,
uint flags) uint flags)
{ {
int error;
trace_xfs_log_force(mp, 0, _RET_IP_); trace_xfs_log_force(mp, 0, _RET_IP_);
error = _xfs_log_force(mp, flags, NULL); _xfs_log_force(mp, flags, NULL);
if (error)
xfs_warn(mp, "%s: error %d returned.", __func__, error);
} }
/* /*
...@@ -3473,12 +3469,8 @@ xfs_log_force_lsn( ...@@ -3473,12 +3469,8 @@ xfs_log_force_lsn(
xfs_lsn_t lsn, xfs_lsn_t lsn,
uint flags) uint flags)
{ {
int error;
trace_xfs_log_force(mp, lsn, _RET_IP_); trace_xfs_log_force(mp, lsn, _RET_IP_);
error = _xfs_log_force_lsn(mp, lsn, flags, NULL); _xfs_log_force_lsn(mp, lsn, flags, NULL);
if (error)
xfs_warn(mp, "%s: error %d returned.", __func__, error);
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment