xfs
[Top] [All Lists]

Re: [PATCH 21/25] xfs: add buffer pre-write callback

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 21/25] xfs: add buffer pre-write callback
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Fri, 26 Oct 2012 04:50:14 -0400
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1351146854-19343-22-git-send-email-david@xxxxxxxxxxxxx>
References: <1351146854-19343-1-git-send-email-david@xxxxxxxxxxxxx> <1351146854-19343-22-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
>       /*
> +      * run the pre-io callback function if it exists. If this function
> +      * fails it will mark the buffer with an error and the IO should
> +      * not be dispatched.
> +      */
> +     if (bp->b_pre_io) {
> +             bp->b_pre_io(bp);
> +             if (bp->b_error) {

Wouldn't it be a cleaner calling convention to return the erro from the
callback?

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