From: Konstantin Tokarev <annulen@yandex.ru>
To: Brent Taylor <motobud@gmail.com>
Cc: "akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Artem Bityutskiy <dedekind1@gmail.com>
Subject: Re: lz4hc compression in UBIFS?
Date: Wed, 23 Oct 2013 17:39:40 +0400 [thread overview]
Message-ID: <133391382535580@web11h.yandex.ru> (raw)
In-Reply-To: <CAP+RiCBSPAHc2aM9byRjhFVePRU-1ODL9aJvN2Y65S4Ddj4sDA@mail.gmail.com>
23.10.2013, 16:49, "Brent Taylor" <motobud@gmail.com>:
> On Wed, Oct 23, 2013 at 2:40 AM, Konstantin Tokarev <annulen@yandex.ru> wrote:
>
>> 23.10.2013, 09:26, "Brent Taylor" <motobud@gmail.com>:
>>> Konstantin,
>>> I did my testing with data from /dev/urandom (which I now realize
>>> wasn't the best choice of data source), but if I use /dev/zero (which
>>> actually causes data compression to occur), the decompressor fails. I
>>> don't know the internal workings of the lz4hc compressor or the lz4
>>> decompressor. I couldn't find any examples of any code in the kernel
>>> actually using the compressor. I've cc'ed the maintainers of the
>>> lz4hc_compress.c to see if they my have some more insight to the
>>> issue.
>> Does decompressor fail for you with the same error messages?
>>
>> Have you tried to copy my file to the volume? It looks like minimal test case
>> for my board, if I remove any line decompressor works fine.
>>
>> --
>> Regards,
>> Konstantin
>
> Yes, I get the same error, here's a dump from UBIFS when I cat a file
> filled with data from /dev/zero:
>
> UBIFS error (pid 4288): ubifs_decompress: cannot decompress 12 bytes,
> compressor lz4hc, error -22
> UBIFS error (pid 4288): read_block: bad data node (block 0, inode 71)
> magic 0x6101831
> crc 0xff61a078
> node_type 1 (data node)
> group_type 0 (no node group)
> sqnum 2700
> len 60
> key (71, data, 0)
> size 512
> compr_typ 3
> data size 12
> data:
> 00000000: 1f 00 01 00 ff e8 50 00 00 00 00 00
> UBIFS error (pid 4288): do_readpage: cannot read page 0 of inode 71, error -22
> cat: /opt/data/zero.bin: Input/output error
>
> Steps to reproduce are:
> 1. Create a file with all zeros: dd if=/dev/zero bs=512 count=1
> of=/opt/data/zero.bin
> 2. Unmount ubifs and detach ubi partition
> 3. attach ubi partition and mount ubifs
> 4. cat /opt/data/zero.bin
Reproduced here.
--
Regards,
Konstantin
WARNING: multiple messages have this Message-ID (diff)
From: Konstantin Tokarev <annulen@yandex.ru>
To: Brent Taylor <motobud@gmail.com>
Cc: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
Artem Bityutskiy <dedekind1@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>
Subject: Re: lz4hc compression in UBIFS?
Date: Wed, 23 Oct 2013 17:39:40 +0400 [thread overview]
Message-ID: <133391382535580@web11h.yandex.ru> (raw)
In-Reply-To: <CAP+RiCBSPAHc2aM9byRjhFVePRU-1ODL9aJvN2Y65S4Ddj4sDA@mail.gmail.com>
23.10.2013, 16:49, "Brent Taylor" <motobud@gmail.com>:
> On Wed, Oct 23, 2013 at 2:40 AM, Konstantin Tokarev <annulen@yandex.ru> wrote:
>
>> 23.10.2013, 09:26, "Brent Taylor" <motobud@gmail.com>:
>>> Konstantin,
>>> I did my testing with data from /dev/urandom (which I now realize
>>> wasn't the best choice of data source), but if I use /dev/zero (which
>>> actually causes data compression to occur), the decompressor fails. I
>>> don't know the internal workings of the lz4hc compressor or the lz4
>>> decompressor. I couldn't find any examples of any code in the kernel
>>> actually using the compressor. I've cc'ed the maintainers of the
>>> lz4hc_compress.c to see if they my have some more insight to the
>>> issue.
>> Does decompressor fail for you with the same error messages?
>>
>> Have you tried to copy my file to the volume? It looks like minimal test case
>> for my board, if I remove any line decompressor works fine.
>>
>> --
>> Regards,
>> Konstantin
>
> Yes, I get the same error, here's a dump from UBIFS when I cat a file
> filled with data from /dev/zero:
>
> UBIFS error (pid 4288): ubifs_decompress: cannot decompress 12 bytes,
> compressor lz4hc, error -22
> UBIFS error (pid 4288): read_block: bad data node (block 0, inode 71)
> magic 0x6101831
> crc 0xff61a078
> node_type 1 (data node)
> group_type 0 (no node group)
> sqnum 2700
> len 60
> key (71, data, 0)
> size 512
> compr_typ 3
> data size 12
> data:
> 00000000: 1f 00 01 00 ff e8 50 00 00 00 00 00
> UBIFS error (pid 4288): do_readpage: cannot read page 0 of inode 71, error -22
> cat: /opt/data/zero.bin: Input/output error
>
> Steps to reproduce are:
> 1. Create a file with all zeros: dd if=/dev/zero bs=512 count=1
> of=/opt/data/zero.bin
> 2. Unmount ubifs and detach ubi partition
> 3. attach ubi partition and mount ubifs
> 4. cat /opt/data/zero.bin
Reproduced here.
--
Regards,
Konstantin
next prev parent reply other threads:[~2013-10-23 13:40 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-20 12:16 lz4hc compression in UBIFS? Konstantin Tokarev
2013-10-04 3:09 ` Brent Taylor
2013-10-04 7:44 ` Artem Bityutskiy
2013-10-04 8:06 ` Konstantin Tokarev
2013-10-21 15:59 ` Konstantin Tokarev
2013-10-22 3:43 ` Brent Taylor
2013-10-22 10:10 ` Konstantin Tokarev
2013-10-23 5:26 ` Brent Taylor
2013-10-23 5:26 ` Brent Taylor
2013-10-23 7:40 ` Konstantin Tokarev
2013-10-23 7:40 ` Konstantin Tokarev
2013-10-23 12:49 ` Brent Taylor
2013-10-23 12:49 ` Brent Taylor
2013-10-23 13:39 ` Konstantin Tokarev [this message]
2013-10-23 13:39 ` Konstantin Tokarev
2013-10-23 18:19 ` Yann Collet
2013-10-24 14:12 ` Konstantin Tokarev
2013-10-24 15:15 ` Konstantin Tokarev
2013-10-28 16:22 ` Konstantin Tokarev
2013-10-28 16:45 ` Florian Fainelli
2013-10-28 16:45 ` Florian Fainelli
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=133391382535580@web11h.yandex.ru \
--to=annulen@yandex.ru \
--cc=akpm@linux-foundation.org \
--cc=dedekind1@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--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.