diff options
author | Qu Wenruo <wqu@suse.com> | 2024-01-29 10:46:07 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2024-05-07 21:31:02 +0200 |
commit | 98fe01af7ebe44bcc11afe4b4d681e27b959adb4 (patch) | |
tree | 7af95ec3e3cbdb381675070a8d7f03625ff7f8e4 /fs/btrfs/compression.h | |
parent | btrfs: compression: add error handling for missed page cache (diff) | |
download | linux-98fe01af7ebe44bcc11afe4b4d681e27b959adb4.tar.xz linux-98fe01af7ebe44bcc11afe4b4d681e27b959adb4.zip |
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>
Diffstat (limited to 'fs/btrfs/compression.h')
-rw-r--r-- | fs/btrfs/compression.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/compression.h b/fs/btrfs/compression.h index 7590dc86d040..2673c25415e5 100644 --- a/fs/btrfs/compression.h +++ b/fs/btrfs/compression.h @@ -104,8 +104,8 @@ void btrfs_submit_compressed_read(struct btrfs_bio *bbio); unsigned int btrfs_compress_str2level(unsigned int type, const char *str); -struct page *btrfs_alloc_compr_page(void); -void btrfs_free_compr_page(struct page *page); +struct folio *btrfs_alloc_compr_folio(void); +void btrfs_free_compr_folio(struct folio *folio); enum btrfs_compression_type { BTRFS_COMPRESS_NONE = 0, |