JFFS2 determine writing state
Jörn Engel
joern at logfs.org
Tue Jan 15 18:26:13 EST 2008
On Tue, 15 January 2008 21:51:44 +0000, Jamie Lokier wrote:
> Jörn Engel wrote:
> >
> > 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?
Yes. Write() may return before or after reliable commit, depending on
hardware, config options and sheer luck.
> If so does fsync/fdatasync/sync_page_range ensure that the preceding
> writes are committed reliably?
Yes.
> And does that include fsync on a
> directory following an atomic rename (for reliable replacement of a
> file)?
Yes.
> 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.
That bit is actually done already, modulo some bugs. Once those bugs
are sorted out, caching actual data is a straight-forward extention.
Jörn
--
The wise man seeks everything in himself; the ignorant man tries to get
everything from somebody else.
-- unknown
More information about the linux-mtd
mailing list