Re: [Yaffs] yaffs1 page_status = 0

Páxina inicial
Anexos:
Mensaxe orixinal
+ (text/plain)
+ (text/html)
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Charles Manning
Data:  
Para: Bettega Stefano
CC: yaffs
Asunto: Re: [Yaffs] yaffs1 page_status = 0
On Wed, May 4, 2016 at 6:53 PM, Bettega Stefano <>
wrote:

> Hi Charles, thanks for your answer.
>
> <snip>
>



> Typical usage is this:
> - at power up we mount all filesystem in read/write mode
> - we read some files from /data (configurations), from /system (images and
> languages), from /nvram (user configuration) and from /token
> (customizations)
> - during work time we only read from /system what we need and save data to
> /nvram; saving is performed when something is changed on when we detect
> that system is being turned off; saving requires from 5 to 15ms (depending
> on what has changed) and we are quite sure that power supply still remain
> active at least for 1,2s after we detected power failure
>


So long as you either flush or close the file it should be fine.

If you just write the file but leave the file open (and unflushed) then
data might still be in the cache.

With Yaffs, once the flush or close call returns, the data is safe on the
flash.


> - after saving we *DO NOT* unmount filesystems and we expect the system to
> die
>
> So the question are:
> - is it correct to turn off device without unmounting filesystems?
>


Yes, that is what Yaffs is all about :-).



> - may mount mark blocks as deleted?
>


What do you mean by that?

When Yaffs scans for bad blocks it just looks at the bad block markers. SO
long as those are marked, it does not matter what the other spare/tags
bytes look like. They can be all 0x00, all 0xff or anything inbetween.


> - if we mount the required partitions in read only mode, could this
> problem being resolved?
>


Maybe, but it is better to understand the problem and fix it rather than
try put on a Band Aid. Try figure out why that byte is ending up zero...


> - is there a way from YDI to force a filesystem check programmatically?
>


Well every time it scans it is effectively doing a filesystem check. There
is no real concept of "checkdisk" because there is no block-stored metadata
to get corrupted.


>
> Thanks for your support and regards,
>
> Stefano
>
>
>
>
> _______________________________________________
> yaffs mailing list
>
> http://stoneboat.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs
>