lkml.org 
[lkml]   [2023]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] btrfs: fix BUG_ON condition in btrfs_cancel_balance
Date
> Seems that it's from times the balance was not cancellable the same way
> as now. Also it's a good time to switch the BUG_ON to an assertion or
> handle it properly.

That's the point. Canceling the balance only takes into account the normal scenarios.
Replacing the BUG ON here with an assertion would make the code cleaner.

> I'll change to to ASSERT, this is really to verify that the state
> tracking works properly.

The ASSERT and BUG ON macros have already helped us uncover many hidden issues.

\
 
 \ /
  Last update: 2023-08-18 05:04    [W:0.043 / U:1.432 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site