On 15.12.20 г. 18:58 ч., David Sterba wrote:
> On Mon, Dec 07, 2020 at 05:32:34PM +0200, Nikolay Borisov wrote:
>> The invariants the asserts are checking are already verified by the
>> tree checker, just remove them.
>
> I haven't found where exactly does tree-checker verify the invariant and
> also think that we can safely leave the asserts there. Even if it's for
> a normally impossible case, assertions usually catch bugs after changing
> some other code.
>
2 if (unlikely((key->objectid < BTRFS_
1 key->objectid > BTRFS_ #define
BTRFS_ROOT_TREE_DIR_OBJECTID 6ULL
402 key->objectid != BTRFS_ROOT_TREE_DIR_OBJECTID &&
1 key->objectid != BTRFS_FREE_INO_OBJECTID)) {
in check_inode_key. We verify that for every inode its objectid is within
range, transitively this assures highest_objectid is also within range. But If
you want to leave it - I'm fine with it.