summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/compression.h
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2017-02-14 19:45:05 +0100
committerDavid Sterba <dsterba@suse.com>2017-02-28 14:26:36 +0100
commite5d74902362f1a06ea3674042d09f1af178c0a20 (patch)
tree18b3bf38ac7e1d72923e423156f5e1843317f695 /fs/btrfs/compression.h
parentbtrfs: use predefined limits for calculating maximum number of pages for comp... (diff)
downloadlinux-e5d74902362f1a06ea3674042d09f1af178c0a20.tar.xz
linux-e5d74902362f1a06ea3674042d09f1af178c0a20.zip
btrfs: derive maximum output size in the compression implementation
The value of max_out can be calculated from the parameters passed to the compressors, which is number of pages and the page size, and we don't have to needlessly pass it around. Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/compression.h')
-rw-r--r--fs/btrfs/compression.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/btrfs/compression.h b/fs/btrfs/compression.h
index 619e64c27444..39ec43ab8df1 100644
--- a/fs/btrfs/compression.h
+++ b/fs/btrfs/compression.h
@@ -41,8 +41,7 @@ int btrfs_compress_pages(int type, struct address_space *mapping,
u64 start, struct page **pages,
unsigned long *out_pages,
unsigned long *total_in,
- unsigned long *total_out,
- unsigned long max_out);
+ unsigned long *total_out);
int btrfs_decompress(int type, unsigned char *data_in, struct page *dest_page,
unsigned long start_byte, size_t srclen, size_t destlen);
int btrfs_decompress_buf2page(const char *buf, unsigned long buf_start,
@@ -76,8 +75,7 @@ struct btrfs_compress_op {
struct page **pages,
unsigned long *out_pages,
unsigned long *total_in,
- unsigned long *total_out,
- unsigned long max_out);
+ unsigned long *total_out);
int (*decompress_bio)(struct list_head *workspace,
struct page **pages_in,