From: Alex Elder <aelder@sgi.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 1/4] libxfs: handle read errors in libxfs_trans_read_buf
Date: Wed, 21 Sep 2011 13:45:07 -0500 [thread overview]
Message-ID: <1316630707.5872.13.camel@doink> (raw)
In-Reply-To: <20110920220030.204339904@bombadil.infradead.org>
On Tue, 2011-09-20 at 17:59 -0400, Christoph Hellwig wrote:
> Libxfs_readbuf may return a NULL buffer to indicate that an error happend
> during the read, but we currently ignore that if libxfs_trans_read_buf
> is called with a NULL transaction pointer. Fix this by copying the
> relevant code from the kernel version of the routine, and also tidy
> the code up a bit by using a common exit label.
>
> This fixes a regression that was introduced in xfsprogs 3.0.0 by commit
>
> "Implement buffer and inode caching in libxfs, groundwork for a
> parallel version of xfs_repair."
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Probably wouldn't hurt to initialize b_fsprivate2 even
if the transaction pointer is null. Looks good though.
Reviewed-by: Alex Elder <aelder@sgi.com>
. . .
> @@ -510,6 +516,7 @@ libxfs_trans_read_buf(
>
> /* initialise b_fsprivate2 so we can find it incore */
> XFS_BUF_SET_FSPRIVATE2(bp, tp);
> +done:
> *bpp = bp;
> return 0;
> }
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2011-09-21 18:45 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-20 21:59 [PATCH 0/4] improve libxfs / xfs_repair I/O error handling Christoph Hellwig
2011-09-20 21:59 ` [PATCH 1/4] libxfs: handle read errors in libxfs_trans_read_buf Christoph Hellwig
2011-09-21 18:45 ` Alex Elder [this message]
2011-09-21 19:49 ` Christoph Hellwig
2011-09-21 20:13 ` Alex Elder
2011-09-20 21:59 ` [PATCH 2/4] libxfs: save errno before possibly overwriting it Christoph Hellwig
2011-09-21 18:45 ` Alex Elder
2011-09-20 21:59 ` [PATCH 3/4] libxfs: handle short reads in libxfs_readbufr Christoph Hellwig
2011-09-21 18:45 ` Alex Elder
2011-09-20 21:59 ` [PATCH 4/4] libxfs: add b_error Christoph Hellwig
2011-09-21 18:45 ` Alex Elder
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=1316630707.5872.13.camel@doink \
--to=aelder@sgi.com \
--cc=hch@infradead.org \
--cc=xfs@oss.sgi.com \
/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