From: Richard Weinberger <richard.weinberger@gmail.com>
To: Mickael Chazaux <mickael.chazaux@etictelecom.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: ubifs_check_node: bad CRC
Date: Mon, 29 Jul 2019 20:16:16 +0200 [thread overview]
Message-ID: <CAFLxGvyicArpTC_VmE8GPXeHwXVT3CV-Z_5v-+qo=MB9i_-6-w@mail.gmail.com> (raw)
In-Reply-To: <5D3EF488.6010307@etictelecom.com>
Mickael,
On Mon, Jul 29, 2019 at 3:28 PM Mickael Chazaux
<mickael.chazaux@etictelecom.com> wrote:
>
> Hello,
>
> I have been using UBIFS on embedded devices for several years now.
> We never had a corrupted filesystem. Recently, I used it on a
> board design based on the previous ones. On this new board I
> had several filesystem corruptions like the one below.
>
> I checked the CRC of the corrupted UBIFS node, and it is incorrect.
> However, the CRC of the UBI LEB and the ECC of the NAND page _are_
> correct.
>
> This node is on a PEB that was copied (copy_flag = 1 in the header)
Side note, you are only allowed to check the CRC of a LEB iff copy_flag is set
and there is a second LEB with the same volume id and LEB number present.
Then you can use the CRC of the LEB with the higher sqnum
Otherwise the CRC can be outdated.
> I have been working on this a lot now, and I would like to hear the
> advice of the experts on how to find the cause of this corruption.
>
> A bit of background :
> The volume "userdata" is used for logging.
> Approx. 1 message per second is logged.
> It is mounted with option sync.
> Its size is 10MiB, the ubi0 device itself is 491MiB.
> There are other volumes on ubi0, that are not
> corrupted (rootfs, etc.) . They are less busy.
>
> I imaged the NAND and can reproduce the error like this :
>
> flash_eraseall /dev/mtd8
> nandwrite -no /dev/mtd8 nand-image.img
> ubiattach /dev/ubi_ctrl -m 8
> mount -t ubifs ubi0:userdata /mnt/
> echo "azer" > /mnt/azer
That easy?
Hmm, sounds a bit like a bug in your NAND driver. Did you test it?
Please also disable compression in UBIFS, then the read back data maybe gives
you a hint what went wrong.
Thanks,
//richard
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2019-07-29 18:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-29 13:28 ubifs_check_node: bad CRC Mickael Chazaux
2019-07-29 18:16 ` Richard Weinberger [this message]
2019-07-30 7:28 ` Mickael Chazaux
2019-08-13 21:41 ` Richard Weinberger
2019-08-23 9:24 ` Mickael Chazaux
2019-08-25 19:02 ` Richard Weinberger
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='CAFLxGvyicArpTC_VmE8GPXeHwXVT3CV-Z_5v-+qo=MB9i_-6-w@mail.gmail.com' \
--to=richard.weinberger@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=mickael.chazaux@etictelecom.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).