xfs
[Top] [All Lists]

Re: [PATCH 12/21] implement generic xfs_btree_updkey

To: Christoph Hellwig <hch@xxxxxx>, xfs@xxxxxxxxxxx
Subject: Re: [PATCH 12/21] implement generic xfs_btree_updkey
From: Christoph Hellwig <hch@xxxxxx>
Date: Fri, 1 Aug 2008 21:44:52 +0200
In-reply-to: <20080730050936.GM13395@disturbed>
References: <20080729193110.GM19104@xxxxxx> <20080730050936.GM13395@disturbed>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.3.28i
On Wed, Jul 30, 2008 at 03:09:36PM +1000, Dave Chinner wrote:
> > +   int                     ptr;
> > +#ifdef DEBUG
> > +   int                     error;
> > +#endif
> 
> This can be scoped inside the for loop.

Done.

> And even then I think we might not need an error variable - it can
> only return EFSCORRUPTED, so:
> 
> #ifdef DEBUG
>               if (xfs_btree_check_block(cur, block, level, bp)) {
>                       XFS_BTREE_TRACE_CURSOR(cur, XBT_ERROR);
>                       return EFSCORRUPTED;
>               }
> #endif
> 
> Would remove the need for the error variable.

I'm not a big fan of losing detailed error information.  Depending
on how the bigger btree blocks work out we might return other errors
here in the near future.


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