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

Christoph Hellwig
2009-10-13T22:12:09Z

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.