JFFS2 determine writing state
Jörn Engel
joern at logfs.org
Tue Jan 15 11:50:43 EST 2008
On Tue, 15 January 2008 14:08:00 +0000, Jamie Lokier wrote:
>
> But the particular fs behaviour is relevant the other way around: I
> have a program which calls open/write/close with small writes
> moderately often (because it calls another program which actually
> operates on the file).
>
> If JFFS2 commits pending writes on every close, I should change things
> to keep the file open between writes so they are coalesced and faster,
> when I don't need the individual writes to be committed separately.
JFFS2 also commits on every write. So you need userspace caching if you
want to coalesce things. fwrite might be enough for that...
> When I do need the data committed I can use fsync of course.
...as long as you also fflush (or fclose) before fsync.
Jörn
--
Everything should be made as simple as possible, but not simpler.
-- Albert Einstein
More information about the linux-mtd
mailing list