LWN.net Logo

Ext4 filesystem hits Android, no need to fear data loss (ars technica)

Ext4 filesystem hits Android, no need to fear data loss (ars technica)

Posted Dec 28, 2010 13:42 UTC (Tue) by butlerm (subscriber, #13312)
In reply to: Ext4 filesystem hits Android, no need to fear data loss (ars technica) by Nick
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.


(Log in to post comments)

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