JFFS2: checking CRCs twice!?
Artem B. Bityuckiy
dedekind at infradead.org
Wed Jan 12 05:08:09 EST 2005
On Wed, 12 Jan 2005, Artem B. Bityuckiy wrote:
> > IIUC than mounting a JFFS2 root fs takes so long (6 seconds on my
> embedded ARM9)
> > cause the CRCs of all blocks/sectors are checked.
> Cause:
> 1. *Some* of CRCs are checked. Nodes has 3 CRCs: (1) Common header CRC,
> (2) Header CRC, (3) Data CRC. On mount, JFFS2 check only common header
> CRCs of inode nodes, and all CRCs of direntries. When checking in
> background, it checks other CRCs.
> 2. On mount, JFFS2 reads blocks fully. So multiply the number of used
> blocks on the block read time and add this number to your mount time. This
> should be fixed, IMHO, since we do not needed, for example, read inode
> node's data.
> 3. It builds different data structures - fragtree list, direntries list.
Sorry, I'm wrong - fragtree is not built during mount. Ony dirent list.
And this is only needed to detect inodes nlink.
> It counts the inode link numbers. This also takes time, especially if you
> have slow CPU. Here is some room to improvement exist.
>
> Seems that's all major activities.
>
> >
> > But then it looks to me that - shortly after boot - the GC thread doing
> the same
> > again (in background.c), which takes another 6 scondes and slows down
> the
> > application startup...
> Not the same, it checks CRCs which were not checked during mount.
>
> > Or am I missing something?
>
> --
> Best Regards,
> Artem B. Bityuckiy,
> St.-Petersburg, Russia.
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
>
--
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.
More information about the linux-mtd
mailing list