JFFS2 and frequent/small write operations
Sergei Sharonov
sergei.sharonov at halliburton.com
Mon Apr 4 17:08:35 EDT 2005
Hi,
> On Mon, 2005-04-04 at 17:15 +0000, Sergei Sharonov wrote:
> > I was told that O_SYNC flag for open does not work with JFFS2 (!?).
>
> You misunderstood. On NOR flash, O_SYNC does nothing because JFFS2 is
> entirely synchronous anyway. On NAND flash, I believe that O_SYNC does
> what it is supposed to -- any write will have reached the medium before
> the write() system call returns.
Thanks, that is good to know. It was suggested by others
http://article.gmane.org/gmane.linux.drivers.mtd/12175/match=+sync
that it may not work on JFFS2. Estelle?
> This has nothing to do with atomicity of writes with respect to power
> failure.
Sorry for the confusion. I did not mean that O_SYNC has anything to do
with atomicity, only that it is usually one of the ways to assure that
all the data is flushed to media. I guess I heard that O_SYNC does
not work with JFFS2, did not want to accept it and was provoking people
to confirm or disprove it ;-)
Sergei Sharonov
More information about the linux-mtd
mailing list