JFFS2 determine writing state

Jamie Lokier jamie at shareable.org
Tue Jan 15 16:51:44 EST 2008


Jörn Engel wrote:
> On Tue, 15 January 2008 17:35:10 +0000, Jamie Lokier wrote:
> > 
> > Oh, ok, I thought it at least merged things in the page cache like
> > most other filesystems.  It seems it's more like O_DSYNC - or more
> > like O_SYNC (commits metadata changed for every write too)?
> 
> I don't think there is a really good equivalent.  Writes happen
> immediatly, but the changes may not become effective immediatly.  In a
> way, the worst of both worlds. :)

I'm not sure if I understand what you mean by that.  Let me guess:

Do you mean that MTD write operations are started by write(), but
write() returns before the writes are committed reliably?

If so does fsync/fdatasync/sync_page_range ensure that the preceding
writes are committed reliably?  And does that include fsync on a
directory following an atomic rename (for reliable replacement of a
file)?

> > Also, does LogFS (which I want to try later) have similar
> > characteristics?
> 
> At the moment, yes.  Most likely I won't get the caching part done
> before LCA.

I guess write caching is an interesting beast for such a structured
filesystem.  It would seem like a good opportunity to coalesce some
tree node updates, something applications can't do themselves.
Looking forward to it :-)

-- Jamie



More information about the linux-mtd mailing list