diff options
| author | Filipe Manana <fdmanana@suse.com> | 2026-11-12 19:56:22 +0000 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2026-11-23 19:52:01 +0100 |
| commit | eb11039d8a3cab58c658ff4b8b14aa4b00961e46 (patch) | |
| tree | c40463e58d3d1f332b62a0a743d9599cf489d5bb /tools/perf/scripts/python/flamegraph.py | |
| parent | fd573263740371f76cad610cbcc70629b27f6c0c (diff) | |
btrfs: fix off-by-one max tree level bound when replaying log trees
In walk_up_log_tree() we are bounding the loop iteration to 7 levels
instead of 8. This is a bug since the maximum number of levels for a
tree is 8 and they go from 0 (leaf level) to 7, so the loop condition
should be:
i < BTRFS_MAX_LEVEL (which 8)
and not
i < BTRFS_MAX_LEVEL - 1 (7)
This means that in case if we ever get a log tree with 8 levels, which
theoretically should be impossible specially because they are very
short lived, we would miss replaying large parts of the log tree.
Link: https://sashiko.dev/#/bug/linux-8d5b7229-3920-47fa-ad36-3a7ddd02f0e7
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>
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions
