* [PATCH] erofs-utils: bump up EROFS_CONFIG_COMPR_MAX_SZ
@ 2022-06-12 16:45 Gao Xiang
0 siblings, 0 replies; only message in thread
From: Gao Xiang @ 2022-06-12 16:45 UTC (permalink / raw)
To: linux-erofs
Otherwise, compression ratios could be limited when
pcluster size is large. Use a static variable for now.
Signed-off-by: Gao Xiang <xiang@kernel.org>
---
include/erofs/compress.h | 4 +---
lib/compress.c | 2 +-
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/include/erofs/compress.h b/include/erofs/compress.h
index 40df2bc..24f6204 100644
--- a/include/erofs/compress.h
+++ b/include/erofs/compress.h
@@ -14,9 +14,7 @@ extern "C"
#include "internal.h"
-/* workaround for an upstream lz4 compression issue, which can crash us */
-/* #define EROFS_CONFIG_COMPR_MAX_SZ (1024 * 1024) */
-#define EROFS_CONFIG_COMPR_MAX_SZ (900 * 1024)
+#define EROFS_CONFIG_COMPR_MAX_SZ (3000 * 1024)
#define EROFS_CONFIG_COMPR_MIN_SZ (32 * 1024)
void z_erofs_drop_inline_pcluster(struct erofs_inode *inode);
diff --git a/lib/compress.c b/lib/compress.c
index 7ebc534..ee3b856 100644
--- a/lib/compress.c
+++ b/lib/compress.c
@@ -607,7 +607,7 @@ void z_erofs_drop_inline_pcluster(struct erofs_inode *inode)
int erofs_write_compressed_file(struct erofs_inode *inode)
{
struct erofs_buffer_head *bh;
- struct z_erofs_vle_compress_ctx ctx;
+ static struct z_erofs_vle_compress_ctx ctx;
erofs_off_t remaining;
erofs_blk_t blkaddr, compressed_blocks;
unsigned int legacymetasize;
--
2.30.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-06-12 16:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-12 16:45 [PATCH] erofs-utils: bump up EROFS_CONFIG_COMPR_MAX_SZ Gao Xiang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.