xfs
[Top] [All Lists]

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

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 04/25] xfs: uncached buffer reads need to return an error
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Fri, 26 Oct 2012 04:48:26 -0400
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1351146854-19343-5-git-send-email-david@xxxxxxxxxxxxx>
References: <1351146854-19343-1-git-send-email-david@xxxxxxxxxxxxx> <1351146854-19343-5-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Thu, Oct 25, 2012 at 05:33:53PM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
> 
> 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@xxxxxxxxxx>

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

Reviewed-by: Christoph Hellwig <hch@xxxxxx>

<Prev in Thread] Current Thread [Next in Thread>