Re: [PATCH v2 7/9] md/raid6: asynchronous handle_stripe6

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 14, 2009 at 10:26 PM, Neil Brown <neilb@xxxxxxx> wrote:
>
> Sorry for the long delay in getting to these.  I week's leave recently
> and that always causes tasks to pile up....
>
> I am happy for this to  all go in this merge window.  I just have a
> few nits I would like to see changed then I'll pull and push to Linus.
>
> in this patch:
>>               /* now count some things */
>>               if (test_bit(R5_LOCKED, &dev->flags)) s.locked++;
>>               if (test_bit(R5_UPTODATE, &dev->flags)) s.uptodate++;
>> +             if (test_bit(R5_Wantcompute, &dev->flags))
>> +                     BUG_ON(++s.compute > 2);
>
> I think having a side-effect in a BUG_ON is very poor form.  I should
> be able to recompile the code with BUG_ON() becoming a no-op and
> everything should still work.
> So something like:
>> +             if (test_bit(R5_Wantcompute, &dev->flags)) {
>> +                     ++s.compute;
>> +                     BUG_ON(s.compute > 2);
>> +             }
>
> please.

Definitely.  Will fix.

Thanks,
Dan
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux