Author: Charles Manning Date: To: yaffs Subject: Re: [Yaffs] Partition size and mounting time
On Friday 05 February 2010 09:01:34 Dunge wrote: > Hi,
>
> We are working on a device with a NAND flash storage. It seems to be
> separated in four different block (/dev/mtdblock0-3), the first one is the
> mbr, the second is the kernel, the third is initrd and the fourth one is
> the operating system. The fourth block is mounted on boot with "mount -t
> yaffs2 -o rw /dev/mtdblock3 /mnt/root". It actually works pretty well, and
> we didn't see any data corruption even with hard power off. >
> Problem is, the actual mount takes about 27seconds of the 30sec booting
> time. This is because every time the system is powered off, the block isn't
> unmounted properly and it needs to check it's data for bad blocks, which is
> a good thing.
27 secs seems like quite a bit. See if you can get some more speed out of your
drivers.
What version and kernel are you using? Is sync working?
The checkpoint is stored when you unmount or sync() but is invalidated by any
modifications.
With a clean checkpoint you should get mount times around 1 second or so.
>
> Still, the yaffs2 block is actually 512mb of size. We re-sized the
> operating system size and our application it we only need under 200meg of
> it. If we could have a way to re-size to block, or tell it to only mount
> part of the block, if would logically take half the time. Problem is, I
> don't have the simplest idea if this it even possible and how should I do
> it.
Repartitioning is a good idea if you can make that work. It also helps to
separate read-only (or write infrequently) data into a separate partition
from write often data. That way the checkpoint will be able to handle the one
partition and scanning will only be required on the write-often part.