All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: u-boot@lists.denx.de
Subject: [U-Boot] Porting UBI fixes (specially fastmap's) to U-Boot
Date: Mon, 19 Oct 2015 23:48:52 +0200	[thread overview]
Message-ID: <56256544.2060306@nod.at> (raw)
In-Reply-To: <CAAEAJfCJBkc9KE1OgpapZH3eRptE=9rBMTmVAk3tpNv43wGWBw@mail.gmail.com>

Am 19.10.2015 um 23:40 schrieb Ezequiel Garcia:
> On 19 October 2015 at 17:22, Richard Weinberger <richard@nod.at> wrote:
>> Am 19.10.2015 um 15:47 schrieb Ezequiel Garcia:
>>> After some further investigation, printing the counters as Richard suggested
>>> I found it was a bug on my side :-( The Linux partition and the U-Boot partition
>>> had different size (i.e. PEB count) and so Fastmap complained :-(
>>>
>>> We trimmed the Linux partition size, and forgot to change U-Boot's
>>> (or thought it wouldn't matter).
>>>
>>> Sorry for the noise guys!
>>
>> Good to know. :)
>>
>> Let me find a way to detect and report this kind of user error
>> better.
>> The WARN_ON() is only meant for bad internal errors.
>>
> 
> Sure. In case it's not clear, let me clarify what the issue was: the
> MTD partition
> has one size in Linux (4072 EB) and another size in U-Boot (4076 EB).
> 
> When the map was built by Linux's Fastmap, it contained a number of PEBs that
> conflicted with the number of PEBs U-Boot's Fastmap code was expecting
> (becase Linux EB != U-Boot EB).
> 
> Not sure how you would detect such a mismatch, but it was a very good
> idea to print a noisy warning :-)

I think it would make sense to drop the WARN_ON() and replace it to a
warning using ubi_err() which explains what possible went wrong.
i.e. MTD partition layout mismatch, an internal error, etc...

> We were effectively running without fastmap so far, becasue neither U-Boot
> nor Linux could find a proper fastmap and attach the UBI partition using it.

Yeah, U-Boot's fast decided to fall back to scanning mode and had to drop the
existing fastmap and therefore Linux also had to do a full scan too.

Thanks,
//richard

  reply	other threads:[~2015-10-19 21:48 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-02 16:27 [U-Boot] Porting UBI fixes (specially fastmap's) to U-Boot Ezequiel Garcia
2015-10-02 18:46 ` Richard Weinberger
2015-10-03  4:27   ` Heiko Schocher
2015-10-03  9:03     ` Richard Weinberger
2015-10-08 12:51 ` Heiko Schocher
2015-10-08 13:03   ` Richard Weinberger
2015-10-08 14:54     ` Heiko Schocher
2015-10-08 14:58       ` Hans de Goede
2015-10-08 16:04         ` Richard Weinberger
2015-10-09  3:34           ` Heiko Schocher
2015-10-08 15:54       ` Ezequiel Garcia
2015-10-09  4:01         ` Heiko Schocher
2015-10-09 12:30           ` Heiko Schocher
2015-10-16  7:56             ` Heiko Schocher
2015-10-16 11:58               ` Ezequiel Garcia
2015-10-17 18:07             ` Ezequiel Garcia
2015-10-17 18:28               ` Richard Weinberger
2015-10-19  5:17               ` Heiko Schocher
2015-10-19 13:47                 ` Ezequiel Garcia
2015-10-19 14:53                   ` Heiko Schocher
2015-10-19 20:22                   ` Richard Weinberger
2015-10-19 21:40                     ` Ezequiel Garcia
2015-10-19 21:48                       ` Richard Weinberger [this message]
2015-10-20  4:00                         ` Heiko Schocher
2015-10-20  7:16                           ` 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=56256544.2060306@nod.at \
    --to=richard@nod.at \
    --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 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.