From mboxrd@z Thu Jan 1 00:00:00 1970 From: Holger Brunck Date: Tue, 13 Sep 2011 10:32:34 +0200 Subject: [U-Boot] UBI problems on current u-boot In-Reply-To: <201109130939.45132.sr@denx.de> References: <4E60DAF8.2090907@keymile.com> <4E64F177.90001@keymile.com> <4E6E3E71.8030105@keymile.com> <201109130939.45132.sr@denx.de> Message-ID: <4E6F1522.4040201@keymile.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Stefan, On 09/13/2011 09:39 AM, Stefan Roese wrote: > Hi Holger, > > On Monday 12 September 2011 19:16:33 Holger Brunck wrote: >> I have seen in mainline kernel this fix in the ubi layer: >> >> commit b86a2c56e512f46d140a4bcb4e35e8a7d4a99a4b >> Author: Artem Bityutskiy >> Date: Sun May 24 14:13:34 2009 +0300 >> >> UBI: do not switch to R/O mode on read errors >> >> This patch improves UBI errors handling. ATM UBI switches to >> R/O mode when the WL worker fails to read the source PEB. >> This means that the upper layers (e.g., UBIFS) has no >> chances to unmap the erroneous PEB and fix the error. >> This patch changes this behaviour and makes UBI put PEBs >> like this into a separate RB-tree, thus preventing the >> WL worker from hitting the same read errors again and >> again. >> >> [...] >> >> And this sounds like the problem I see in u-boot. > > Yes, very likely. > >> But this patch is not >> easy to port onto u-boot because previously undergoing changes in the >> kernels ubi layer... > > Correct. UBI has undergone many changes since the integration into U-Boot back > in the end of 2008 (nearly 3 years ago now). Perhaps the best would be to re- > synch with the latest Linux UBI version. But this sounds like quite a lot of > work as well... > if found a way to port only this patch. But I had to do some changes to it. E.g. exchange the constants for errors with numeric values as present in u-boots ubi version. And remove setting of the constants (MOVE_TARGET_RD_ERR) values which are not evaluated in u-boots ubi version. This fixes my problem. Should I post this patch? Regards Holger