aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2021-09-27 15:22:04 +0800
committerDavid Sterba <dsterba@suse.com>2021-10-26 19:08:05 +0200
commitd4088803f51140e9324f66453bdd24e48f982a1e (patch)
tree2dd338b0fa20764e0142906cddabf27f0f8492e5 /tools/perf/scripts/python
parentbtrfs: factor uncompressed async extent submission code into a new helper (diff)
downloadwireguard-linux-d4088803f51140e9324f66453bdd24e48f982a1e.tar.xz
wireguard-linux-d4088803f51140e9324f66453bdd24e48f982a1e.zip
btrfs: subpage: make lzo_compress_pages() compatible
There are several problems in lzo_compress_pages() preventing it from being subpage compatible: - No page offset is calculated when reading from inode pages For subpage case, we could have @start which is not aligned to PAGE_SIZE. Thus the destination where we read data from must take offset in page into consideration. - The padding for segment header is bound to PAGE_SIZE This means, for subpage case we can skip several corners where on x86 machines we need to add padding zeros. The rework will: - Update the comment to replace "page" with "sector" - Introduce a new helper, copy_compressed_data_to_page(), to do the copy So that we don't need to bother page switching for both input and output. Now in lzo_compress_pages() we only care about page switching for input, while in copy_compressed_data_to_page() we only care about the page switching for output. - Only one main cursor For lzo_compress_pages() we use @cur_in as main cursor. It will be the file offset we are currently at. All other helper variables will be only declared inside the loop. For copy_compressed_data_to_page() it's similar, we will have @cur_out at the main cursor, which records how many bytes are in the output. Signed-off-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions