From: Konstantin Tokarev <annulen@yandex.ru>
To: Elie De Brauwer <eliedebrauwer@gmail.com>
Cc: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
"motobud@gmail.com" <motobud@gmail.com>,
"dedekind1@gmail.com" <dedekind1@gmail.com>
Subject: Re: [PATCH v0] mkfs.ubifs: Add support for lz4hc compressor in mkfs.ubifs
Date: Sat, 05 Oct 2013 18:17:31 +0400 [thread overview]
Message-ID: <8451380982651@web23h.yandex.ru> (raw)
In-Reply-To: <201501380981068@web15m.yandex.ru>
05.10.2013, 17:52, "Konstantin Tokarev" <annulen@yandex.ru>:
> 05.10.2013, 17:25, "Konstantin Tokarev" <annulen@yandex.ru>:
>
>> 05.10.2013, 16:56, "Elie De Brauwer" <eliedebrauwer@gmail.com>:
>>> That's odd, yesterday I started by cloning mtd-utils.git and when I
>>> try to repeat my own steps and apply my patch it does seem to work.
>> I've figured it out: you've included patch into the mail instead of attaching
>> it as a file, so I copied it, and tab characters got lost. patch -p1 -l
>> works successfully.
>
> When trying to compress my rootfs, I got message "32866 compression errors occurred".
> Resulting image is much larger than LZO one (133M for lz4hc, 86M for lzo, 79M for zlib)
The next patch over your patch fixes the issue:
diff --git a/mkfs.ubifs/compr.c b/mkfs.ubifs/compr.c
index 2030042..65c7dbe 100644
--- a/mkfs.ubifs/compr.c
+++ b/mkfs.ubifs/compr.c
@@ -109,9 +109,10 @@ static int lz4hc_compress(void *in_buf, size_t in_len, void *out_buf,
size_t *out_len)
{
int ret;
- ret = LZ4_compressHC_limitedOutput(in_buf, out_buf, in_len, *out_len);
+ ret = LZ4_compressHC(in_buf, out_buf, in_len);
+ *out_len = ret;
- if (ret != 0) {
+ if (ret == 0) {
errcnt += 1;
return -1;
}
I've replaced LZ4_compressHC_limitedOutput with LZ4_compressHC to match lzo_compress logic which changes out_len instead of limiting it. No errors are reported now. However, result is still larger than LZO (93M).
--
Regards,
Konstantin
next prev parent reply other threads:[~2013-10-05 14:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-05 6:53 [PATCH v0] mkfs.ubifs: Add support for lz4hc compressor in mkfs.ubifs Elie De Brauwer
2013-10-05 11:53 ` Konstantin Tokarev
2013-10-05 12:56 ` Elie De Brauwer
2013-10-05 13:24 ` Konstantin Tokarev
2013-10-05 13:51 ` Konstantin Tokarev
2013-10-05 14:17 ` Konstantin Tokarev [this message]
2013-10-05 14:25 ` Elie De Brauwer
2013-10-05 14:17 ` Elie De Brauwer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8451380982651@web23h.yandex.ru \
--to=annulen@yandex.ru \
--cc=dedekind1@gmail.com \
--cc=eliedebrauwer@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=motobud@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.