]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
btrfs: prepare zstd to support bs > ps cases
authorQu Wenruo <wqu@suse.com>
Mon, 8 Sep 2025 06:58:16 +0000 (16:28 +0930)
committerDavid Sterba <dsterba@suse.com>
Tue, 23 Sep 2025 06:49:24 +0000 (08:49 +0200)
commita6452b85b3e55aafceb84c25784f25f63ba620b0
tree23f616ce7223dd13f6d678ef806c3f1b9dddb4d9
parentc2ffb1ec1a7cfc754c1d2fe66d317f0aa4c0f1e6
btrfs: prepare zstd to support bs > ps cases

This involves converting the following functions to use proper folio
sizes/shifts:

- zstd_compress_folios()
- zstd_decompress_bio()

The function zstd_decompress() is already using block size correctly
without using page size, thus it needs no modification.

And since zstd compression is calling kmap_local_folio(), the existing
code cannot handle large folios with HIGHMEM, as kmap_local_folio()
requires us to handle one page range each time.

I do not really think it's worth to spend time on some feature that will
be deprecated eventually.  So here just add an extra explicit rejection
for bs > ps with HIGHMEM feature enabled kernels.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/fs.c
fs/btrfs/zstd.c