JFFS 2 Question

Thomas Gleixner tglx at linutronix.de
Sat Jul 10 06:18:10 EDT 2004


On Sat, 2004-07-10 at 11:38, Brad Campbell wrote:
> Patrick Hilt wrote:
> > Hi list!
> > Is there a way to make sure data is being written to physical flash when using 
> > JFFS2? In other words, After writing a file on a JFFS2 partition, is there 
> > anything that can be done to make sure that the data is getting written to 
> > the flash right away? Would "sync" or "fsync" have that effect?
> 
> I believe that jffs2 is a synchronous filesystem in any case. By the time your application has 
> returned from the write() call, the data is on flash.

You're right and wrong. :)

On standard NOR FLASH it is synchronous. On NAND/AND FLASH and some
strange NOR FLASH types we must write page aligned and therefor were use
a write buffer of page size, which is either flushed timed by kupdated
or by sync/fsync/ummount.

tglx






More information about the linux-mtd mailing list