]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
xfs: don't print warnings when xfs_log_force fails
authorChristoph Hellwig <hch@lst.de>
Mon, 9 Jan 2017 21:41:33 +0000 (13:41 -0800)
committerJack Vogel <jack.vogel@oracle.com>
Mon, 9 Apr 2018 23:04:12 +0000 (16:04 -0700)
[ Upstream commit 84a4620cfe97c9d57e39b2369bfb77faff55063d ]

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.

Orabug: 27609404
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>
Reviewed-by: wen.gang.wang@oracle.com
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
fs/xfs/xfs_log.c

index d4cd7b08727f79aa1181a677d921e45380ad5b40..40ebfb43f439ef425d5a4d9d9f2e59fc6224fea5 100644 (file)
@@ -3341,12 +3341,8 @@ xfs_log_force(
        xfs_mount_t     *mp,
        uint            flags)
 {
-       int     error;
-
        trace_xfs_log_force(mp, 0);
-       error = _xfs_log_force(mp, flags, NULL);
-       if (error)
-               xfs_warn(mp, "%s: error %d returned.", __func__, error);
+       _xfs_log_force(mp, flags, NULL);
 }
 
 /*
@@ -3490,12 +3486,8 @@ xfs_log_force_lsn(
        xfs_lsn_t       lsn,
        uint            flags)
 {
-       int     error;
-
        trace_xfs_log_force(mp, lsn);
-       error = _xfs_log_force_lsn(mp, lsn, flags, NULL);
-       if (error)
-               xfs_warn(mp, "%s: error %d returned.", __func__, error);
+       _xfs_log_force_lsn(mp, lsn, flags, NULL);
 }
 
 /*