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

Christoph Hellwig hch at infradead.org
Fri Oct 26 03:48:26 CDT 2012


On Thu, Oct 25, 2012 at 05:33:53PM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner at 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 at 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 at lst.de>



More information about the xfs mailing list