public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@sigma-star.at>
To: Timo Ketola <timo@exertus.fi>
Cc: linux-mtd@lists.infradead.org
Subject: Re: UBI assert failed in ubi_wl_init
Date: Fri, 23 Mar 2018 10:35:40 +0100	[thread overview]
Message-ID: <2757178.TuWGByBY2B@blindfold> (raw)
In-Reply-To: <d154d30e-af96-007f-70cb-dafbbfd294ef@exertus.fi>

Timo,

Am Freitag, 23. März 2018, 10:26:30 CET schrieb Timo Ketola:
> On 22.03.2018 17:48, Richard Weinberger w> rote:
> > Am Donnerstag, 22. März 2018, 16:40:42 CET schrieb Timo Ketola:
> >> I'm slightly confused though, because flash_erase reports total of eight
> >> blocks:
> >> 
> >> # flash_eraseall /dev/mtd1
> >> Erasing 128 Kibyte @ 3bf60000 - 48% complete.
> >> Skipping bad block at 0x3bf80000
> >> 
> >> Skipping bad block at 0x3bfa0000
> >> 
> >> Skipping bad block at 0x3bfc0000
> >> 
> >> Skipping bad block at 0x3bfe0000
> >> Erasing 128 Kibyte @ 7bf60000 - 99% complete.
> >> Skipping bad block at 0x7bf80000
> >> 
> >> Skipping bad block at 0x7bfa0000
> >> 
> >> Skipping bad block at 0x7bfc0000
> >> 
> >> Skipping bad block at 0x7bfe0000
> >> Erasing 128 Kibyte @ 7c000000 - 100% complete.
> >> 
> >> 
> >> but, log tells only about four blocks:
> >> 
> >> [    1.549699] Bad block table found at page 524224, version 0x01
> >> [    1.554241] Bad block table found at page 1048512, version 0x01
> >> [    1.561314] Bad block table found at page 524160, version 0x01
> >> [    1.565853] Bad block table found at page 1048448, version 0x01
> >> [    1.573232] 2 ofpart partitions found on MTD device gpmi-nand
> >> [    1.577688] Creating 2 MTD partitions on "gpmi-nand":
> >> [    1.581499] 0x000000000000-0x000004000000 : "system"
> >> [    1.595001] 0x000004000000-0x000080000000 : "user"
> > 
> > Now things get interesting.
> > Can it be that the number of bad blocks is not stable?
> > IOW sometimes 4 and sometimes 8 are reported?
> > This would more or less explain what you see.
> 
> Dumps show that the two blocks per chip are really bad block tables. The
> other two are empty. Could it be that the mtd reserves the other two for
> bbt mirrors?

This can be.

> Anyway, I configured the bbt off and now there is full 15872 good PEBs
> but the issue stays. Here is a dump after full erase ('nand scrub' from
> U-Boot), ubiformat, ubiattach, ubimkvol -m -N user and a couple of reboots:
> 
> https://drive.google.com/open?id=1QGUIxarow3mGXbiJYgsLzc-a_Y5oN5XS
> 
> Is there any documents about the structure of fastmap blocks? google was
> no friend for me...

See ubi-media.h.
 
> > Fastmap does not care about bad block itself, all it cares about the total
> > number of good blocks.
> 
> How does it record the block references, absolute or relative to good
> blocks?
> 
> | a | b | bad | c |
> 
> Would it record c as block 3 (as absolute) or 2 (as third good one)?

As I said, Fastmap does not care at all. It takes the PEB numbers from UBI.
And UBI just skips bad blocks. So c will be 3.

The big difference between Fastmap and non-Fastmap is that PEB numbers are 
stored on flash.
So maybe we have bug in this area.

Thanks,
//richard

-- 
sigma star gmbh - Eduard-Bodem-Gasse 6 - 6020 Innsbruck - Austria
ATU66964118 - FN 374287y

      reply	other threads:[~2018-03-23  9:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-01  6:44 UBI assert failed in ubi_wl_init Timo Ketola
2018-02-04 13:44 ` Richard Weinberger
2018-02-05  6:39   ` Timo Ketola
2018-02-12 22:49     ` Richard Weinberger
2018-02-13 11:58       ` Timo Ketola
2018-02-13 12:42         ` Richard Weinberger
2018-02-13 14:00           ` Timo Ketola
2018-02-18 20:31             ` Richard Weinberger
2018-03-16 13:34               ` Timo Ketola
2018-03-19  7:13                 ` Timo Ketola
2018-03-20 22:02                 ` Richard Weinberger
2018-03-22 13:57                   ` Timo Ketola
2018-03-22 15:05                     ` Richard Weinberger
2018-03-22 15:40                       ` Timo Ketola
2018-03-22 15:48                         ` Richard Weinberger
2018-03-23  9:26                           ` Timo Ketola
2018-03-23  9:35                             ` Richard Weinberger [this message]

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=2757178.TuWGByBY2B@blindfold \
    --to=richard@sigma-star.at \
    --cc=linux-mtd@lists.infradead.org \
    --cc=timo@exertus.fi \
    /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