jffs2: too few erase blocks

Jamie Lokier jamie at shareable.org
Mon Oct 29 18:50:29 EDT 2007

David Woodhouse wrote:
> On Mon, 2007-10-29 at 20:51 +0000, Jamie Lokier wrote:
> > When you say "sync", do fdatasync() / fsync() on open files and
> > directories flush the necessary blocks from wbuf for those
> > files/directories data and their inode metadata, for JFFS2?
> > 
> > I have been calling sync(), but I wonder if fdatasync/fsync do as they
> > are supposed to?
> They certainly should; if you find otherwise, please tell me.

So far, with JFFS2 on cfi_cmdset_0002 NOR flash, on a Linux 2.4.26-uc0
kernel, I haven't seen any data failed to be committed after sync()

As JFFS2 is synchronous with this type of flash we shouldn't
be surprised, and that makes fsync/fdatasync nops.

If I ever do use another type of flash with JFFS2 (or any of the other
flash fses) then I'll be sure to report any problems with
fsync/fdatasync not committing data.  See also my earlier message on
what you might add to a test suite for these fses, to check
fsync/fdatasync implementation much better than random application
usage and system crashes can possibly do.

 -- Jamie

More information about the linux-mtd mailing list