Re: [PATCH 1/8] xfs: check for buffer errors before waiting

Dave Chinner
2012-03-29T21:17:45Z

On Thu, Mar 29, 2012 at 03:12:03PM -0400, Christoph Hellwig wrote:
> The actual fix looks good:
>
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
>
> But shou;dn't we move the setting of b_error to zero into common buffer
> code instead of adding it to the callers?

We generally do - in xfs_buf_iodone_callbacks() - which covers
pretty much all cached buffer IO.

However, for uncached buffers, it is only zeroed in xfs_buf_alloc().
For single use buffers, this is fine, but for multiple use buffers
like the log uses during recovery for log IO, it doesn't get reset
anywhere because the buffer doesn't go anywhere near common buffer
code between IOs.

Cheers,

Dave.
--
Dave Chinner
david@fromorbit.com