JFFS2 as transactional FS (in other words: how to be sure that data have been writtent correctly from userspace)
joern at lazybastard.org
Thu Mar 8 07:54:17 EST 2007
On Thu, 8 March 2007 10:51:38 +0000, David Woodhouse wrote:
> On NOR you don't need the sync(). At least, if you're using write() you
> don't need the sync. I make no claims about what glibc does with
> fwrite(), but I believe fsync() ought to be perfectly sufficient.
> JFFS2 doesn't support O_SYNC because it's _already_ synchronous.
It used to be. And then came wbuf.c. With write buffer enabled, JFFS2
is still serialized, but no longer synchronous (in the meaning of having
an implicit sync() after each operations).
Last time I checked, JFFS2 got one case wrong. Don't remember which one,
but there are not that many to check:
- mount -o sync
- open(..., O_SYNC);
[ Side note - NOR flash can still have a write buffer and require
explicit sync. ]
Prosperity makes friends, adversity tries them.
-- Publilius Syrus
More information about the linux-mtd