|
|
Subscribe / Log in / New account

Ext4 breaking the promise of data=ordered ?

Ext4 breaking the promise of data=ordered ?

Posted Mar 31, 2009 20:57 UTC (Tue) by mfleetwo (guest, #57754)
In reply to: From ext3 to ext4: An Interview with Theodore Ts'o (Linux Magazine) by sbergman27
Parent article: From ext3 to ext4: An Interview with Theodore Ts'o (Linux Magazine)

From my reading of Ted Ts'o blog "Delayed allocation and the zero-length file problem" (http://thunk.org/tytso/blog/2009/03/12/delayed-allocation...) it seems to be that ext4 does not live up to the promise that ext3 made for data=ordered.

The ext3 FAQ says this about data=ordered:
"mount -o data=ordered"
Only journals metadata changes, but data updates are flushed to
disk before any transactions commit. Data writes are not atomic
but this mode still guarantees that after a crash, files will
never contain stale data blocks from old files.

It seems that Ted Ts'o comments in his blog say that because ext4 is performing delayed allocation data will not be allocated to blocks and written to disk before the metadata is written to the journal, thus breaking the exceptation. I would have hopped that before the metadata is committed in the journal, outstanding data for all inodes being committed in the journal are allocated and flushed to disk. With a 60 second commit by default a lot of data can be written. If very large files are being written and fragmentation is a concern then fallocate() can be used to pre-allocate all the space in a single extent as Ted points out in this article. If the user wan't dalayed allocation beyond each journal commit then that is what data=writeback is for.


to post comments

Ext4 breaking the promise of data=ordered ?

Posted Mar 31, 2009 21:35 UTC (Tue) by sbergman27 (guest, #10767) [Link] (1 responses)

In ext3, data=ordered was considered to be a reliability feature. Ted is clearly trying to spin it as only having been a security feature. (Which I happen to think is a load of crap.) Now that we have heard from Linus on the matter, I'm curious to hear Stephen Tweedie's views. Stephen Tweedie is the kind of dev whose filesystems you can really feel good entrusting your data to.

Ext4 breaking the promise of data=ordered ?

Posted Mar 31, 2009 22:57 UTC (Tue) by bojan (subscriber, #14302) [Link]

Since you mention Stephen, here is an interesting quote (from here: http://markmail.org/message/nkh4og2ymaavek73):

> Correct. Journaled data mode has the side-effect of maintaining a strict order for data writes, both with respect to each other (ie. writes in a given order will always preserve that order after a crash), and with respect to metadata such as timestamps. That's not a data integrity issue, but it is certainly a consistency issue; Unix semantics basically don't give you any consistency guarantees whatsoever unless the application is requesting consistent checkpoints via fsync/O_SYNC etc; but journaled data mode provides extra consistency nonetheless.

I think more than one person understands the _real_ semantics here.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds