@@ -333,8 +333,8 @@ static noinline int compress_file_range(struct inode *inode,
unsigned long nr_pages_ret = 0;
unsigned long total_compressed = 0;
unsigned long total_in = 0;
- unsigned long max_compressed = 128 * 1024;
- unsigned long max_uncompressed = 128 * 1024;
+ unsigned long max_compressed = 512 * 1024;
+ unsigned long max_uncompressed = 512 * 1024;
int i;
int will_compress;
int compress_type = root->fs_info->compress_type;
@@ -343,7 +343,7 @@ static noinline int compress_file_range(struct inode *inode,
again:
will_compress = 0;
nr_pages = (end >> PAGE_CACHE_SHIFT) - (start >> PAGE_CACHE_SHIFT) + 1;
- nr_pages = min(nr_pages, (128 * 1024UL) / PAGE_CACHE_SIZE);
+ nr_pages = min(nr_pages, (512 * 1024UL) / PAGE_CACHE_SIZE);
/*
* we don't want to send crud past the end of i_size through
@@ -368,7 +368,7 @@ again:
*
* 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.
+ * a compressed extent to 512k (was 128k).
*/
total_compressed = min(total_compressed, max_uncompressed);
num_bytes = (end - start + blocksize) & ~(blocksize - 1);