diff options
| author | Qu Wenruo <wqu@suse.com> | 2020-11-03 21:31:04 +0800 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2020-12-08 15:54:05 +0100 |
| commit | 480a8ec83b179da1c484133b0f687090e89b00c5 (patch) | |
| tree | d81465488070407b1c59a28fdd137e2d57374c56 /tools/perf/scripts/python/bin | |
| parent | btrfs: scrub: remove the force parameter from scrub_pages (diff) | |
| download | linux-480a8ec83b179da1c484133b0f687090e89b00c5.tar.gz linux-480a8ec83b179da1c484133b0f687090e89b00c5.zip | |
btrfs: scrub: refactor scrub_find_csum()
Function scrub_find_csum() is to locate the csum for bytenr @logical
from sctx->csum_list.
However it lacks a lot of comments to explain things like how the
csum_list is organized and why we need to drop csum range which is
before us.
Refactor the function by:
- Add more comments explaining the behavior
- Add comment explaining why we need to drop the csum range
- Put the csum copy in the main loop
This is mostly for the incoming patches to make scrub_find_csum() able
to find multiple checksums.
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions
