Atomic write with JFFS2

Sidney Chu schu at istor.com
Tue Jul 13 20:19:46 EDT 2004


Hi,

I have several questions regarding the JFFS2 in my development
environment.
Would you please help me by answering the questions? Thanks in advance.
The development environment:
1. Use Toshiba NAND Flash. It has 512 bytes sector and 16 bytes header
   for each sector. The Erase Page contains 32 sectors. Hence the Erase
   Page is 16Kbytes (512x32) plus another 512 bytes header (16x32).
2. The JFFS2 page size is configured as 4Kbytes.
3. The JFFS2 compression is on.
4. I need atomic write to avoid the problems if there is not finished
   writing during power failure.

My questions are the following:
1. Does JFFS2 guarantee the atomic write on JFFS2 page size which is
   4Kbytes in my development environment?
2. If I have a 1Mbytes file, can JFFS2 guarantee the atomic write every
time
   when I only update partial part of the file? The partial update is
either
   within 4Kbytes or more than 4Kbytes. What happen if the partial
update
   crosses the JFFS2 page boundary?

Regards,
Sidney




More information about the linux-mtd mailing list