j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Author: wmb Date: 2008-02-01 05:05:35 +0100 (Fri, 01 Feb 2008) New Revision: 806
Modified: ofw/fs/jffs2/jffs2.fth Log: OLPC trac 6291 followup - faster implementation of raw node scanning in the event of large amounts of erased space.
Modified: ofw/fs/jffs2/jffs2.fth =================================================================== --- ofw/fs/jffs2/jffs2.fth 2008-02-01 03:40:36 UTC (rev 805) +++ ofw/fs/jffs2/jffs2.fth 2008-02-01 04:05:35 UTC (rev 806) @@ -742,16 +742,26 @@
\ This assumes that the entire erase block is in memory : another-node? ( adr -- false | adr' true ) - eb-end swap ?do - i w@ jffs2-magic = if - i header-crc? if - i +raw-node eb-end u<= if - i true unloop exit + eb-end over - ( adr len ) + begin ( adr len ) + h# ff skipchar ( adr' len' ) + dup 8 >= while ( adr len ) + over w@ jffs2-magic = if ( adr len ) + over header-crc? if ( adr len ) + drop dup +raw-node ( adr end-adr ) + eb-end u<= if ( adr ) + true ( adr true ) + else ( adr ) + \ Node extends past end of erase block + drop false ( false ) then + exit then - then - loop - false + else ( adr len ) + 1 /string ( adr' len' ) + then ( adr len ) + repeat ( adr len ) + 2drop false ;
: rdpino@ ( adr -- parent ) 3 j@ ;