linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Allison Collins <allison.henderson@oracle.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>, sandeen@sandeen.net
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 2/4] libxfs: complain when write IOs fail
Date: Thu, 6 Feb 2020 12:38:02 -0700	[thread overview]
Message-ID: <b3746c06-9269-cad2-360d-26d3aec23d91@oracle.com> (raw)
In-Reply-To: <158086365728.2079905.9556999948179065078.stgit@magnolia>

On 2/4/20 5:47 PM, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> Complain whenever a metadata write fails.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Looks good:
Reviewed-by: Allison Collins <allison.henderson@oracle.com>

> ---
>   libxfs/rdwr.c |    7 ++++++-
>   1 file changed, 6 insertions(+), 1 deletion(-)
> 
> 
> diff --git a/libxfs/rdwr.c b/libxfs/rdwr.c
> index 2e9f66cc..8b47d438 100644
> --- a/libxfs/rdwr.c
> +++ b/libxfs/rdwr.c
> @@ -1149,7 +1149,12 @@ libxfs_writebufr(xfs_buf_t *bp)
>   			(long long)LIBXFS_BBTOOFF64(bp->b_bn),
>   			(long long)bp->b_bn, bp, bp->b_error);
>   #endif
> -	if (!bp->b_error) {
> +	if (bp->b_error) {
> +		fprintf(stderr,
> +	_("%s: write failed on %s bno 0x%llx/0x%x, err=%d\n"),
> +			__func__, bp->b_ops->name,
> +			(long long)bp->b_bn, bp->b_bcount, -bp->b_error);
> +	} else {
>   		bp->b_flags |= LIBXFS_B_UPTODATE;
>   		bp->b_flags &= ~(LIBXFS_B_DIRTY | LIBXFS_B_EXIT |
>   				 LIBXFS_B_UNCHECKED);
> 

  reply	other threads:[~2020-02-06 19:38 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-05  0:47 [PATCH 0/4] libxfs: actually check that writes succeeded Darrick J. Wong
2020-02-05  0:47 ` [PATCH 1/4] libxfs: libxfs_buf_delwri_submit should write buffers immediately Darrick J. Wong
2020-02-06 19:37   ` Allison Collins
2020-02-17 13:57   ` Christoph Hellwig
2020-02-19  5:42     ` Darrick J. Wong
2020-02-05  0:47 ` [PATCH 2/4] libxfs: complain when write IOs fail Darrick J. Wong
2020-02-06 19:38   ` Allison Collins [this message]
2020-02-17 13:57   ` Christoph Hellwig
2020-02-05  0:47 ` [PATCH 3/4] libxfs: return flush failures Darrick J. Wong
2020-02-06 19:38   ` Allison Collins
2020-02-19  4:38     ` Darrick J. Wong
2020-02-17 14:00   ` Christoph Hellwig
2020-02-19  4:39     ` Darrick J. Wong
2020-02-05  0:47 ` [PATCH 4/4] misc: make all tools check that metadata updates have been committed Darrick J. Wong
2020-02-06 19:38   ` Allison Collins
2020-02-19  5:42     ` Darrick J. Wong
2020-02-17 14:01   ` Christoph Hellwig

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=b3746c06-9269-cad2-360d-26d3aec23d91@oracle.com \
    --to=allison.henderson@oracle.com \
    --cc=darrick.wong@oracle.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@sandeen.net \
    /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).