RE: [Yaffs] open files and power failures

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Charles Manning
Date:  
To: Jacob Dall, yaffs
Subject: RE: [Yaffs] open files and power failures
Wookey has already answered this, but I'll add a bit more.


> Hello anyone,
>
> How does yaffs behave if one or more files are open when a
> power failure occurs?


YAFFS was designed for use as a highly robust file system for embedded
systems. In my mind, embedded systems by definition mean unreliable
power downs etc.

YAFFS is log structured. This means that changes are written to the file
systems. The structure is built up in RAM at mount/scan time. There are
no FAT tables or similar to get messed up.

>
> Has it been tested?


Yes, by many people, and has been shipping in many products for a long
time. There have been problems with the Linux interface, but the core
file system has been very robust for a long time now.
>
> Can one risk to lose the files that was open before the power fail?


No. The only time that data from old files gets tampered with is during
a garbage collection exercise. This is done in a copy-before-delete
sequence so the data is not lost if power is lost during the garbage
collection.


-- Charles