[v4 PATCH 10/13] ubifs: Use crypto_acomp interface
Herbert Xu
herbert at gondor.apana.org.au
Sat Mar 15 02:12:48 PDT 2025
On Sat, Mar 15, 2025 at 05:08:47PM +0800, Zhihao Cheng wrote:
>
> According to the warning message, current compressor is zstd. The output
> buffer size is limited only for LZO compressor by [1].
Any algorithm can and will produce output longer than the input,
if you give it enough output buffer.
Previously an output buffer length of 2x the input length was given
to all algorithms, meaning that they would all succeed no matter
whether the input can be compressed or not.
This has now been changed so that incompressible data is not
needlessly compressed all the way to the end. In fact we should
reduce it further to eliminate the UBIFS_MIN_COMPRESS_DIFF check.
I will remove the warning on compression since failures are
expected and reduce the output buffer length further to remove
the post-compression length check.
Thanks,
--
Email: Herbert Xu <herbert at gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
More information about the linux-mtd
mailing list