]> Gentwo Git Trees - linux/.git/commit
btrfs: mark leaf space and overflow checks as unlikely on insert and extension
authorFilipe Manana <fdmanana@suse.com>
Tue, 16 Sep 2025 15:33:00 +0000 (16:33 +0100)
committerDavid Sterba <dsterba@suse.com>
Tue, 23 Sep 2025 06:49:23 +0000 (08:49 +0200)
commit5afe85b771eefe91891cca332cb916f8da6d48e1
tree11a56a45717c369cfe903c750710611570087969
parentb0e30e373e3752d4a59cb0f2b6a4aa8b3b54f041
btrfs: mark leaf space and overflow checks as unlikely on insert and extension

We have several sanity checks when inserting or extending items in a btree
that verify we didn't overflow the leaf or access a slot beyond the last
one. These are cases that are never expected to be hit so mark them as
unlikely, allowing the compiler to potentially generate better code.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.c