From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] Possible incoherence in UBI attaching, incorrect bad PEBs
Date: Fri, 12 Jun 2015 07:27:17 +0200 [thread overview]
Message-ID: <557A6DB5.8020004@denx.de> (raw)
In-Reply-To: <CALWDRhg3p++Z+DqM837KEZFpMO7y4=iEJWSkqr8_Z3hKEU8NcQ@mail.gmail.com>
Hello Walter,
Am 11.06.2015 19:04, schrieb Walter Mollica:
> Hi everyone,
> I am writing to get some information about what seems to be an incongruency
> in the U-Boot's UBI subsystem.
>
> I am using U-Boot 2015.04/2015.01 (haven't tried with previous versions),
> cloned today from the git tree on denx.de, on a SAMA5D3XEK hardware with a
> NAND Flash.
>
> There's a newly flashed UBI image on the NAND.
>
> When attaching the mtd partition in U-boot I get the following result:
> U-Boot> ubi part ubivolume
> UBI: attaching mtd1 to ubi0
> UBI: scanning is finished
> UBI: attached mtd1 (name "mtd=8", size 232 MiB) to ubi0
> UBI: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
> UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
> UBI: VID header offset: 2048 (aligned 2048), data offset: 4096
> UBI: good PEBs: 1862, bad PEBs: 0, corrupted PEBs: 0
> UBI: user volume: 3, internal volumes: 1, max. volumes count: 128
> UBI: max/mean erase counter: 2/0, WL threshold: 4096, image sequence
> number: 1307283568
> UBI: available PEBs: 1247, total reserved PEBs: 615, PEBs reserved for bad
> PEB handling: 40
>
> While, when doing the same (at boot time) from my GNU/Linux system
> (Buildroot'ed 3.10.0 on initramfs) I get:
> UBI: scanning is finished
> UBI: attached mtd8 (name "ubivolume", size 232 MiB) to ubi0
> UBI: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
> UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
> UBI: VID header offset: 2048 (aligned 2048), data offset: 4096
> UBI: good PEBs: 1858, bad PEBs: 4, corrupted PEBs: 0
> UBI: user volume: 3, internal volumes: 1, max. volumes count: 128
> UBI: max/mean erase counter: 0/0, WL threshold: 4096, image sequence
> number: 1307283568
> UBI: available PEBs: 1247, total reserved PEBs: 611, PEBs reserved for bad
> PEB handling: 36
>
> The max/mean erase counter are different as you can see, but there is
> another thing that scares me more.
>
> These two lines are *different*
> In U-Boot
> UBI: good PEBs: 1862, bad PEBs: 0, corrupted PEBs: 0
> in Linux
> UBI: good PEBs: 1858, bad PEBs: 4, corrupted PEBs: 0
>
> 4 PEBs which Linux's UBI marks as bad are seen as good from U-Boot.
>
> Moreover, this 4 PEBs seem to have migrated into this other line (the last
> one):
> In U-Boot:
> UBI: available PEBs: 1247, total reserved PEBs: 615, PEBs reserved for bad
> PEB handling: 40
> In Linux:
> UBI: available PEBs: 1247, total reserved PEBs: 611, PEBs reserved for bad
> PEB handling: 36
>
> As you can see the reserved PEBs for bad PEB handling in U-Boot are 4+ in
> respect to the number reported by Linux.
Hmm.. hard to say, why this is diffrent ... We use UBI Code from
Linux 3.15 ... so the "UBI" behaviour should be the same
I tend to say, you have problems with detecting Bad Blocks on your
nand / nand driver problem ...
>>From what you know, is this to be considered some kind of "expected
> behaviour", misconfiguration or there's a problem to be fixed?
>
> As some UBI volumes will be written by both U-Boot and Linux, I am
> concerned about this issue. And it would be interesting to discover who's
> right between U-Boot and Linux.
Yes, that would be interesting, maybe both UBI are right, if your
nand driver (U-Boot or Linux) has problems ...
bye,
Heiko
>
> Thank you.
>
> Saluti,
> Walter Mollica
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
prev parent reply other threads:[~2015-06-12 5:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-11 17:04 [U-Boot] Possible incoherence in UBI attaching, incorrect bad PEBs Walter Mollica
2015-06-12 5:27 ` Heiko Schocher [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=557A6DB5.8020004@denx.de \
--to=hs@denx.de \
--cc=u-boot@lists.denx.de \
/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