Ext4 filesystem hits Android, no need to fear data loss (ars technica)
Posted Dec 28, 2010 13:42 UTC (Tue) by butlerm
In reply to: Ext4 filesystem hits Android, no need to fear data loss (ars technica)
Parent article: Ext4 filesystem hits Android, no need to fear data loss (ars technica)
What's difficult about fsync?
The problem is that fsync is a much slower, more heavyweight operation than is actually needed in most cases. Usually what you need on recovery is consistency, not durability.
Rename-replace points are an unusually convenient place to provide consistency. The FS just needs to go a little out of its way to make sure that upon recovery after a rename replace you either get the old version or the new version of the file being replaced
To be sure, the quick and dirty way of providing consistent rename replace is for the FS to force the new version to permanent storage before committing the rename transaction. That is not really necessary though. You can also create rename undo records and on recovery roll back to the last completely written version. No sync serialization required, let alone the user visible thumb twiddling variety.
to post comments)