aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorGravatar David Sterba <dsterba@suse.com> 2017-02-14 19:30:39 +0100
committerGravatar David Sterba <dsterba@suse.com> 2017-02-28 14:26:35 +0100
commitff7638665c9a82894cabd18d26a9f8957f280f55 (patch)
treee7edeb798742e45df9e2966b2fb8c30e31a607a2 /fs/btrfs/inode.c
parentbtrfs: merge nr_pages input and output parameter in compress_pages (diff)
downloadlinux-ff7638665c9a82894cabd18d26a9f8957f280f55.tar.gz
linux-ff7638665c9a82894cabd18d26a9f8957f280f55.tar.bz2
linux-ff7638665c9a82894cabd18d26a9f8957f280f55.zip
btrfs: export compression buffer limits in a header
Move the buffer limit definitions out of compress_file_range. Reviewed-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 83bbe1e31869..77fb24b94a9e 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -471,16 +471,6 @@ again:
(start > 0 || end + 1 < BTRFS_I(inode)->disk_i_size))
goto cleanup_and_bail_uncompressed;
- /* we want to make sure that amount of ram required to uncompress
- * an extent is reasonable, so we limit the total size in ram
- * of a compressed extent to 128k. This is a crucial number
- * because it also controls how easily we can spread reads across
- * cpus for decompression.
- *
- * We also want to make sure the amount of IO required to do
- * a random read is reasonably small, so we limit the size of
- * a compressed extent to 128k.
- */
total_compressed = min(total_compressed, max_uncompressed);
num_bytes = ALIGN(end - start + 1, blocksize);
num_bytes = max(blocksize, num_bytes);