jffs2: too few erase blocks

David Woodhouse dwmw2 at infradead.org
Sun Oct 28 22:59:07 EDT 2007


On Sun, 2007-10-28 at 18:02 +0000, Jamie Lokier wrote:
> 
> If you call "fsync()" or "fdatasync()" after writing the data to a
> file, that is suppoe to ensure the data is written when the function
> returns.
> 
> That's supposed to happen, but I don't know if JFFS2 actually does
> that.
> 
> If you call fsync() on a directory handle, that traditionally ensures
> the file names in that directory are written.  So to be sure of
> creating a file and writing to it, you would create the file, write
> it, fsync() it, then open the directory containing the file and
> fsync() the directory.  For example, email delivery programs use that
> strategy before reporting to a sender that the email is safely stored.
> 
> But again, I don't know if JFFS2 actually does provide those
> assurances.

Yes, it does. In fact, on NOR flash you get entirely synchronous
behaviour even _without_ explicit syncs -- effectively the same as
MS_SYNC.

-- 
dwmw2




More information about the linux-mtd mailing list