btrfs: compression: convert page allocation to folio interfaces
authorQu Wenruo <wqu@suse.com>
Mon, 29 Jan 2024 09:46:07 +0000 (20:16 +1030)
committerDavid Sterba <dsterba@suse.com>
Tue, 7 May 2024 19:31:02 +0000 (21:31 +0200)
commit98fe01af7ebe44bcc11afe4b4d681e27b959adb4
tree7af95ec3e3cbdb381675070a8d7f03625ff7f8e4
parent6de3595473b0bae11102ef6db40e6f2334f13ed2
btrfs: compression: convert page allocation to folio interfaces

Currently we have two wrappers to allocate and free a page for
compression usage:

- btrfs_alloc_compr_page()
- btrfs_free_compr_page()

The allocator would try to grab a page from the pool, and only allocate
a new page if the pool is empty.

The reclaimer would check if the pool is full, and if not full it would
put the page into the pool.

This patch converts both helpers to use folio interfaces, and allowing
further conversion of compression path to folios.

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/compression.c
fs/btrfs/compression.h
fs/btrfs/inode.c
fs/btrfs/lzo.c
fs/btrfs/zlib.c
fs/btrfs/zstd.c