diff options
author | Christoph Hellwig <hch@lst.de> | 2017-02-02 02:55:57 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-02-04 03:47:11 -0500 |
commit | 4f4d5082ec73f6e0bd44a8eccbef440b96f46a98 (patch) | |
tree | 867c6a2cd2ececeb0dfbca1d77473779361e23ba /fs | |
parent | e9b77651910722cd74a3936f230366503089bc80 (diff) |
xfs: don't print warnings when xfs_log_force fails
commit 84a4620cfe97c9d57e39b2369bfb77faff55063d 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: Christoph Hellwig <hch@lst.de>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/xfs/xfs_log.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index 3b74fa011bb1..4017aa967331 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c | |||
@@ -3324,12 +3324,8 @@ xfs_log_force( | |||
3324 | xfs_mount_t *mp, | 3324 | xfs_mount_t *mp, |
3325 | uint flags) | 3325 | uint flags) |
3326 | { | 3326 | { |
3327 | int error; | ||
3328 | |||
3329 | trace_xfs_log_force(mp, 0, _RET_IP_); | 3327 | trace_xfs_log_force(mp, 0, _RET_IP_); |
3330 | error = _xfs_log_force(mp, flags, NULL); | 3328 | _xfs_log_force(mp, flags, NULL); |
3331 | if (error) | ||
3332 | xfs_warn(mp, "%s: error %d returned.", __func__, error); | ||
3333 | } | 3329 | } |
3334 | 3330 | ||
3335 | /* | 3331 | /* |
@@ -3473,12 +3469,8 @@ xfs_log_force_lsn( | |||
3473 | xfs_lsn_t lsn, | 3469 | xfs_lsn_t lsn, |
3474 | uint flags) | 3470 | uint flags) |
3475 | { | 3471 | { |
3476 | int error; | ||
3477 | |||
3478 | trace_xfs_log_force(mp, lsn, _RET_IP_); | 3472 | trace_xfs_log_force(mp, lsn, _RET_IP_); |
3479 | error = _xfs_log_force_lsn(mp, lsn, flags, NULL); | 3473 | _xfs_log_force_lsn(mp, lsn, flags, NULL); |
3480 | if (error) | ||
3481 | xfs_warn(mp, "%s: error %d returned.", __func__, error); | ||
3482 | } | 3474 | } |
3483 | 3475 | ||
3484 | /* | 3476 | /* |