linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Carlos Maiolino <cmaiolino@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH] xfs: don't print warnings when xfs_log_force fails
Date: Mon, 2 Jan 2017 10:28:35 +0100	[thread overview]
Message-ID: <20170102092835.4wxfysc4jlflwo2z@eorzea.usersys.redhat.com> (raw)
In-Reply-To: <1482999799-11776-2-git-send-email-hch@lst.de>

On Thu, Dec 29, 2016 at 09:23:19AM +0100, Christoph Hellwig wrote:
> 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.

Stop spamming the kernel log with the "error -5 returned." messages will be
great.

The code looks good too.

you can add:

Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>


Cheers

> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  fs/xfs/xfs_log.c | 12 ++----------
>  1 file changed, 2 insertions(+), 10 deletions(-)
> 
> diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
> index c39ac14..b1469f0 100644
> --- a/fs/xfs/xfs_log.c
> +++ b/fs/xfs/xfs_log.c
> @@ -3317,12 +3317,8 @@ xfs_log_force(
>  	xfs_mount_t	*mp,
>  	uint		flags)
>  {
> -	int	error;
> -
>  	trace_xfs_log_force(mp, 0, _RET_IP_);
> -	error = _xfs_log_force(mp, flags, NULL);
> -	if (error)
> -		xfs_warn(mp, "%s: error %d returned.", __func__, error);
> +	_xfs_log_force(mp, flags, NULL);
>  }
>  
>  /*
> @@ -3466,12 +3462,8 @@ xfs_log_force_lsn(
>  	xfs_lsn_t	lsn,
>  	uint		flags)
>  {
> -	int	error;
> -
>  	trace_xfs_log_force(mp, lsn, _RET_IP_);
> -	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);
>  }
>  
>  /*
> -- 
> 2.1.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Carlos

  parent reply	other threads:[~2017-01-02  9:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-29  8:23 make log force warnings less annoying Christoph Hellwig
2016-12-29  8:23 ` [PATCH] xfs: don't print warnings when xfs_log_force fails Christoph Hellwig
2016-12-29 14:42   ` Alex Elder
2016-12-29 18:09     ` Christoph Hellwig
2016-12-29 19:00       ` Alex Elder
2017-01-02  9:28   ` Carlos Maiolino [this message]
2017-01-09 11:08   ` Christoph Hellwig
2017-01-09 21:21   ` Darrick J. Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170102092835.4wxfysc4jlflwo2z@eorzea.usersys.redhat.com \
    --to=cmaiolino@redhat.com \
    --cc=hch@lst.de \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).