erofs-utils: bump up EROFS_CONFIG_COMPR_MAX_SZ
PATCH 1/1 erofs-utils: bump up EROFS_CONFIG_COMPR_MAX_SZ
Otherwise, compression ratios could be limited when pcluster size is large. Use a static variable for now.
Signed-off-by Gao Xiang <[email protected]>
--- include/erofs/compress.h | 4 +--- lib/compress.c | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-)
include/erofs/compress.h +1 -3
@@ -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);
lib/compress.c +1 -1
@@ -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;
Signature · 1 line
2.30.2