On Tuesday 12 October 2004 21:54, Daniel Gustafsson wrote:
> When I run yaffs/direct and create, write, closes a file I always get an
> ECC error (**>>eec error fix performed on chunk XXX; Block 1 marked for
> retirement) regardless if I have the ECC turned off. Why???
What do you mean by "ECC turned off"?
In YAFFS you can say "USE NAND ECC" which means that YAFFS assumes the NAND
does (or the mtd driver) does its own ECC andYAFFS does not have to.
Otherwise, YAFFS does its own ECC calculations and will give you these errors
if the ECC does not work.
If you're using YAFFS in a situation where you don't want ECC then say "USE
NAND ECC" which means that YAFFS won't do the ECC.
>
> How does the reserved blocks in the device work? Which blocks are reserved?
> Some simple explanation how the reserved and startblock work would be nice.
You cannot use block 0 of a NAND device.
the start block is the first block of the device available to YAFFS.
The endBlock is the last block available to YAFFS.
Typically you'd use startBlock=1 and enbBlock = devices_size_in-block -1, but
frequently people do things like running two yaffs partitions by doing
partiton 0
start=1
end=n
partion 1
start = n+1
end = size -1
The ReservedBlocks does not reserve any particular blocks. What it says is
that yaffs should reserve this number of blocks. The reserved space serves
three purposes:
* it keeps some blocks as backup in case blocks fail.
* it keeps space spare to handle inflight cached data.
* it keeps spare space for garbage collection.
YAFFS will not mount with less than 2 reserved free. How many you want to
have depends on the degree of robustness you want against serial block
failures. As a guideline 5 to 10 should be enough.
Hope that helps
-- Charles