Skip to content

Commit 84a4620

Browse files
Christoph Hellwigdjwong
Christoph Hellwig
authored andcommitted
xfs: don't print warnings when xfs_log_force fails
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 <[email protected]> Reviewed-by: Carlos Maiolino <[email protected]> Signed-off-by: Darrick J. Wong <[email protected]>
1 parent 12ef830 commit 84a4620

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

fs/xfs/xfs_log.c

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3317,12 +3317,8 @@ xfs_log_force(
33173317
xfs_mount_t *mp,
33183318
uint flags)
33193319
{
3320-
int error;
3321-
33223320
trace_xfs_log_force(mp, 0, _RET_IP_);
3323-
error = _xfs_log_force(mp, flags, NULL);
3324-
if (error)
3325-
xfs_warn(mp, "%s: error %d returned.", __func__, error);
3321+
_xfs_log_force(mp, flags, NULL);
33263322
}
33273323

33283324
/*
@@ -3466,12 +3462,8 @@ xfs_log_force_lsn(
34663462
xfs_lsn_t lsn,
34673463
uint flags)
34683464
{
3469-
int error;
3470-
34713465
trace_xfs_log_force(mp, lsn, _RET_IP_);
3472-
error = _xfs_log_force_lsn(mp, lsn, flags, NULL);
3473-
if (error)
3474-
xfs_warn(mp, "%s: error %d returned.", __func__, error);
3466+
_xfs_log_force_lsn(mp, lsn, flags, NULL);
34753467
}
34763468

34773469
/*

0 commit comments

Comments
 (0)