Re: [PATCH] Btrfs: remove level==0 check in balance_level

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

 



On Wed, Sep 12, 2018 at 06:06:23AM +0800, Liu Bo wrote:
> btrfs_search_slot()
>    if (level != 0)
>       setup_nodes_for_search()
>           balance_level()
> 
> It is just impossible to have level=0 in balance_level.

While this is true, what do you think about adding ASSERT(level > 0) ?
This is to catch accidentally passing level 0.



[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux