[Yaffs] Using YAFFS to store data right before powercut

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Helmut Raiger
Date:  
To: yaffs
Subject: [Yaffs] Using YAFFS to store data right before powercut
Hi,

     we try the following:


1) setup some data in an 8kByte block in RAM
2) frequently modify this data during normal operation
3) on a power fail signal write the block to a file on a NAND flash
partition
4) recover from the written data after the power cut

The time between power failure notification and the uP-reset is
guaranteed by hardware
and is about 20ms.

Simply fsync()ing the file in case of a power cut does not seem
reliable, for
- the file system might be full
- the garbage collector might run to free dirty LEBs and erase the
corresponding PEBs
The latter overstretching our timing requirements.

This is on an embedded system (i.mx31, arm1136@532MHz) running Linux
3.something
(we are quite flexible in adapting new kernel versions), currently
testing on 3.0.45.

Could someone hint the course to follow for this szenario?

Any pointers appreciated,
Helmut
PS: I've already asked the very same question on linux-mtd (more
specifically about UBIFS) to no avail. I thought YAFFS might be more
suitable due to its more predictable garbage collector.


--
Scanned by MailScanner.