diff options
author | 2018-11-28 09:54:56 +0100 | |
---|---|---|
committer | 2018-12-17 14:51:41 +0100 | |
commit | d2e174d5d3eedb3b9dd97167307bf1f01bd2fa5c (patch) | |
tree | 35131555f323b709ffa0926e0d673f156b3c4428 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | btrfs: don't initialize 'offset' in map_private_extent_buffer() (diff) | |
download | linux-rng-d2e174d5d3eedb3b9dd97167307bf1f01bd2fa5c.tar.xz linux-rng-d2e174d5d3eedb3b9dd97167307bf1f01bd2fa5c.zip |
btrfs: document extent mapping assumptions in checksum
Document why map_private_extent_buffer() cannot return '1' (i.e. the map
spans two pages) for the csum_tree_block() case.
The current algorithm for detecting a page boundary crossing in
map_private_extent_buffer() will return a '1' *IFF* the extent buffer's
offset in the page + the offset passed in by csum_tree_block() and the
minimal length passed in by csum_tree_block() - 1 are bigger than
PAGE_SIZE.
We always pass BTRFS_CSUM_SIZE (32) as offset and a minimal length of 32
and the current extent buffer allocator always guarantees page aligned
extends, so the above condition can't be true.
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions