[dm-devel] [PATCH RESEND] dm-raid: Do not call BUG() in __rdev_sectors()

Heinz Mauelshagen heinzm at redhat.com
Fri Jun 30 12:33:02 UTC 2017



On 06/30/2017 09:33 AM, Johannes Thumshirn wrote:
> On Thu, Jun 29, 2017 at 04:09:38PM +0200, Heinz Mauelshagen wrote:
>> Hi Hannes,
>>
>> thanks for your patch.
>>
>> BUG() is intentional there to catch what I've already fixed with patch
>>
>> "[dm-devel] [PATCH] dm raid: fix oops on upgrading to extended superblock
>> format"
>>
>> on 06/23/2017.
>>
>> IOW: returning 0 is never right and would hide bugs like that one fixed.
> OTOH panicing systems to catch errors which could've been mitigted is
> never right as well. Not a single time. Never. BUG() and BUG_ON() are not
> for error handling.

Point taken. We'll change that.

>




More information about the dm-devel mailing list