diff options
| author | Qu Wenruo <wqu@suse.com> | 2026-07-12 13:12:51 +0930 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2026-07-21 06:41:18 +0200 |
| commit | 330dcc553f282e8dc0b88c9495b4c296465364e1 (patch) | |
| tree | 5f312305e316ec9c18f3d64a24a46e021a6b7585 /tools/perf/scripts/python/bin/stackcollapse-record | |
| parent | c438d34ec1eed4d23e2081d61c5e96f5176898a9 (diff) | |
btrfs: raid56: fix an incorrect csum skip during scrub
Commit 7425a2894019 ("btrfs: introduce btrfs_bio_for_each_block_all()
helper") uses the new helper to replace the nested loop inside
verify_bio_data_sectors(), which simplifies the code.
However that also changed the behavior of "continue" when a block has no
data checksum.
Previously the "continue" would skip the old for() loop, which would also
increase @total_sector_nr.
Now the "continue" will skip the new btrfs_bio_for_each_block_all()
loop, which doesn't update @total_sector_nr.
This means if we hit a block that has no data checksum, we will skip all
the remaining blocks no matter if they have data checksum.
As @total_sector_nr will never be updated, and that test_bit() will
always return false.
Fix it by increasing @total_sector_nr before calling "continue".
Fixes: 7425a2894019 ("btrfs: introduce btrfs_bio_for_each_block_all() helper")
Reviewed-by: Daniel Vacek <neelx@suse.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-record')
0 files changed, 0 insertions, 0 deletions
