[PATCH 01/14] repair: merge scanfunc_bno and scanfunc_cnt

Alex Elder aelder at sgi.com
Tue Oct 13 18:36:47 CDT 2009


On , Christoph Hellwig wrote:
> On Mon, Oct 12, 2009 at 11:53:00AM -0500, Eric Sandeen wrote:
>> 
>> Should we explicitly test that this is either XFS_ABTC_MAGIC or
>> XFS_ABTB_MAGIC here to avoid any programming-error
>> type problems?
> 
> We really only have two freespace btrees.  But I'll add an assert
> just to be sure.
> 
>>> -				else  {
>>> +					break;
>>> +				case XR_E_FREE1:
>>> +					/*
>>> +					 * no warning messages -- we'll catch
>>> +					 * FREE1 blocks later
>>> +					 */
>>> +					if (magic != XFS_ABTB_MAGIC) {
>> 
>> Why not make this explicitly "if (magic == XFS_ABTC_MAGIC)" - I guess it seems potentially
>> more future-proof to me though I don't suppose we'll ever get a new type here.  :)
>> The positive test seems clearer to me but *shrug*.
> 
> Ok, changed.

With changes as described, looks good.

Reviewed-by: Alex Elder <aelder at sgi.com>




More information about the xfs mailing list