]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
btrfs: extract the max compression chunk size into a macro
authorQu Wenruo <wqu@suse.com>
Fri, 27 Feb 2026 02:45:53 +0000 (13:15 +1030)
committerDavid Sterba <dsterba@suse.com>
Tue, 7 Apr 2026 16:56:00 +0000 (18:56 +0200)
commitcab4c8b594e23649591317c5f0606ea6a8a27236
tree980ab22b99fa2c51374117a10e82e3eacfd621de
parent45cc960ff777ac9f4e57c896f1d01adc99fd696e
btrfs: extract the max compression chunk size into a macro

We have two locations using open-coded 512K size, as the async chunk
size.

For compression we have not only the max size a compressed extent can
represent (128K), but also how large an async chunk can be (512K).

Although we have a macro for the maximum compressed extent size, we do
not have any macro for the async chunk size.

Add such a macro and replace the two open-coded SZ_512K.

Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/compression.h
fs/btrfs/inode.c