From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Schocher Date: Tue, 22 May 2018 09:29:26 +0200 Subject: [U-Boot] UBI: regression since "mtd: ubi: Fix worker handling" In-Reply-To: References: <0a34e4d0-7563-313f-ec09-e14ef8f27d58@st.com> <2899268.ayio2GfFjU@blindfold> <3108482.g5XAZ8n9jd@blindfold> <34348a91-586a-0a66-f2d4-db7d0fe0877d@st.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: u-boot@lists.denx.de Hello Patrice, Am 22.05.2018 um 09:21 schrieb Patrice CHOTARD: > Hi Richard, Heiko > > On 05/22/2018 08:51 AM, Patrice CHOTARD wrote: >> Hi >> >> On 05/22/2018 08:37 AM, Richard Weinberger wrote: >>> Am Dienstag, 22. Mai 2018, 08:30:45 CEST schrieb Heiko Schocher: >>>> Hello Richard, >>>> >>>> Am 21.05.2018 um 21:31 schrieb Richard Weinberger: >>>>> 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 >>>>> 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 >>>>>       Signed-off-by: Richard Weinberger >>>> >>>>> 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. >>>> >>>> Yes, but I am currently under load, and doing a rebase is a bigger >>>> task I fear (I speculate currently to automate this task with tbot, >>>> let me think a little bit about this, if this would work, U-Boot UBI >>>> would autaomtically follow linux tree, and I immediately would see >>>> merge errors ...) >>> >>> Ok. :-) >>> >>>> Also before a rebase can go mainline, we need deep testing. So no >>>> fast chance here for me ... sorry. If we can find commits, which >>>> fix this regression, it may makes sense to apply them before such a >>>> rebase ... ? >>> >>> As I said, commit 1cb8f9776c7dcadc57885c6653943511d282633b should do >>> the trick. >>> Patrice, can you please give it a try? > > I confirm this patch fixes the issue. > > Thanks for your reactivity ;-) Thanks for testing! Could you may send a formal patch to the U-Boot ML ? Thanks! bye, Heiko > > Patrice > >> >> Yes sure, >> >> Thanks >> >> Patrice >> >>> >>> Thanks, >>> //richard >> > -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs at denx.de