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] UBI: regression since "mtd: ubi: Fix worker handling"
Date: Mon, 21 May 2018 21:31:55 +0200	[thread overview]
Message-ID: <2899268.ayio2GfFjU@blindfold> (raw)
In-Reply-To: <20114634.YJdGbKEMWP@blindfold>

Patrice,

Am Montag, 21. Mai 2018, 16:07:41 CEST schrieb Richard Weinberger:
> >   		e->pnum = aeb->pnum;
> >   		e->ec = aeb->ec;
> >   		ubi->lookuptbl[e->pnum] = e;
> > +		ubi->thread_enabled = 1;
> 
> This is not correct. At this point the UBI thread is not ready.
> I know, I know, U-Boot has no threads but some data structures might
> not be ready.
> 
> Let me think how to work around this properly.

The root cause seems to be that U-Boot misses this fix from Linux:

commit 1cb8f9776c7dcadc57885c6653943511d282633b
Author: Richard Weinberger <richard@nod.at>
Date:   Tue Aug 11 23:27:44 2015 +0200

    ubi: fastmap: Implement produce_free_peb()
    
    If fastmap requests a free PEB for a pool and UBI is busy
    with erasing PEBs we need to offer a function to wait for one.
    We can reuse produce_free_peb() from the non-fastmap WL code
    but with different locking semantics.
    
    Cc: stable at vger.kernel.org # 4.1.x-
    Reported-and-tested-by: Jörg Krause <joerg.krause@embedded.rocks>
    Signed-off-by: Richard Weinberger <richard@nod.at

Heiko, I'm currently working on Fastmap in Linux[0].
I suggest to re-syncing with Linux if my changes go upstream, I can ping you them. :-)
Fastmap gained many improvements since the last sync.

Thanks,
//richard

[0] http://lists.infradead.org/pipermail/linux-mtd/2018-May/080965.html

  reply	other threads:[~2018-05-21 19:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-21 13:38 [U-Boot] UBI: regression since "mtd: ubi: Fix worker handling" Patrice CHOTARD
2018-05-21 14:07 ` Richard Weinberger
2018-05-21 19:31   ` Richard Weinberger [this message]
2018-05-22  6:30     ` Heiko Schocher
2018-05-22  6:37       ` Richard Weinberger
2018-05-22  6:51         ` Patrice CHOTARD
2018-05-22  7:21           ` Patrice CHOTARD
2018-05-22  7:29             ` Heiko Schocher
2018-05-22  7:38               ` Patrice CHOTARD

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=2899268.ayio2GfFjU@blindfold \
    --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.