On Wed, Jul 9, 2014 at 1:19 AM, Chris Gofforth wrote: > All: > > > Our system will not have the unmount() function, since there will be no > 'power down' sequence, but data can still be written to a file system at > certain times. I was reading in How Yaffs Works, section 13.6 talks about > Block summaries that were introduced to speed up mount times, but it does > not state when these summaries are written, I do see that Checkpoints are > written for a file system when 'sync() is called. Is this also when the > Block Summaries are written out also? The block summaries are written in the block on a per block basis as the blocks are filled, thus these still happen even if sync() is never called or the system is always dhut down by a power failure. They are written in the last n chunks of the block. Yaffs does all the calculations to figure out how many. Typically n = 1. That means if you have blocks of, say, 64 chunks then the first 63 chunks will be regular data/object header chunks and the last chunk will hold block summary information. The last chunk is chosen because: (a) It fits in with the constraint that some flash parts have that flash pages within a block must be written sequentially and (b) if fits in with the scanning which scans backwards. Yaffs detects the block summary is a block summary chunk, rather than a data chunk, and uses it accordingly. If the last chunk contains regular data then it will be treated as data. That means it is perfectly safe to turn on block summaries without reformatting a block. Yaffs will handle the mix of summarised and non-summarised blocks fine. -- Charles