From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Lawnick Date: Tue, 04 Nov 2008 12:14:26 +0100 Subject: [U-Boot] [PATCH/RFC] Some speed improvements to U-Boot JFFS2 code In-Reply-To: <490BAA2A.6020806@emcraft.com> References: <1223877234-720-1-git-send-email-yanok@emcraft.com> <20081013081442.665DB85DAB1C@gemini.denx.de> <48F5E5CB.3070303@emcraft.com> <48F73540.3020504@gmx.de> <490BAA2A.6020806@emcraft.com> Message-ID: <49102E92.7010909@gmx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Ilya Yanok said the following: > Hello Michael, > > Michael Lawnick wrote: ... >> d) output of 'ls' is corrupted: no date and access right output, >> directories in / are shown multiple times > > Can you please be more specific on this? Is this with > CFG_JFFS2_SORT_FRAGMENTS enabled or not? How did you create your FS? I > can't reproduce any of described symptoms on our system... > > The only thing I can tell you for now is that the first patch from my > posting is wrong, the following patch fixes the problem: > ... I added your patch, it corrected date part of 'ls'. For both versions (CFG_JFFS2_SORT_FRAGMENTS set or not set) - device root based directories are printed out up to 9 times - output of access rights is still corrupted, e.g.: d????-??-? 0 Tue Oct 21 11:08:17 2008 10 -????-??-? 262144 Thu Jan 01 00:00:33 1970 u-boot.bin d????-??-? 0 Tue Oct 21 11:08:32 2008 1 d????-??-? 0 Tue Oct 21 11:00:58 2008 2 The difference is: *with* CFG_JFFS2_SORT_FRAGMENTS time for ls is ~ 16s *without* CFG_JFFS2_SORT_FRAGMENTS time for ls is ~ 2s Setup scenario: U-boot flashed, Linux booted and jffs mounted on erased flash --> in background-process flash gets formatted. create dir '10' in root of flash, copy 2 files with ~1.2MB each into it. Run following script ~300 times: mkdir /flash/11 cp /flash/10/* /flash/11 rm -rf /flash/1 mv /flash/2 /flash/1 mv /flash/3 /flash/2 mv /flash/4 /flash/3 mv /flash/5 /flash/4 mv /flash/6 /flash/5 mv /flash/7 /flash/6 mv /flash/8 /flash/7 mv /flash/9 /flash/8 mv /flash/10 /flash/9 mv /flash/11 /flash/10 sync This should mix up jffs image enough to see what I observe. -- Michael Lawnick Software Design Engineer Lise-Meitner-Str. 7/1 89081 Ulm Tel: +49 731 9533 2066 Michael.Lawnick.ext at nsn.com http://www.nokiasiemensnetworks.com/global/ Think before you print