Re: [PATCH 04/25] xfs: uncached buffer reads need to return an error

Christoph Hellwig
2012-10-26T08:46:47Z

On Thu, Oct 25, 2012 at 05:33:53PM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
>
> With verification being done as an IO completion callback, different
> errors can be returned from a read. Uncached reads only return a
> buffer or NULL on failure, which means the verification error cannot
> be returned to the caller.
>
> Split the error handling for these reads into two - a failure to get
> a buffer will still return NULL, but a read error will return a
> referenced buffer with b_error set rather than NULL. The caller is
> responsible for checking the error state of the buffer returned.
>
> Signed-off-by: Dave Chinner <dchinner@redhat.com>

I'd still prefer the error as return value, but in case you don't want
that yet:

Reviewed-by: Christoph Hellwig <hch@lst.de>