diff options
| author | Filipe Manana <[email protected]> | 2023-04-26 11:51:37 +0100 |
|---|---|---|
| committer | David Sterba <[email protected]> | 2023-06-19 13:59:22 +0200 |
| commit | 88ad95b055764e4c74fb6b8201f794f4e531753d (patch) | |
| tree | 8d8b0464f207ee7906a2bd7d681a6311b81dd157 /tools/perf/scripts/python/net_dropmonitor.py | |
| parent | f2db4d5cb457b7da439d5509bdb6f7b01054c11b (diff) | |
btrfs: tag as unlikely the key comparison when checking sibling keys
When checking siblings keys, before moving keys from one node/leaf to a
sibling node/leaf, it's very unexpected to have the last key of the left
sibling greater than or equals to the first key of the right sibling, as
that means we have a (serious) corruption that breaks the key ordering
properties of a b+tree. Since this is unexpected, surround the comparison
with the unlikely macro, which helps the compiler generate better code
for the most expected case (no existing b+tree corruption). This is also
what we do for other unexpected cases of invalid key ordering (like at
btrfs_set_item_key_safe()).
Reviewed-by: Qu Wenruo <[email protected]>
Signed-off-by: Filipe Manana <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/net_dropmonitor.py')
0 files changed, 0 insertions, 0 deletions