LWN.net Logo

ext4 and data loss

ext4 and data loss

Posted Mar 12, 2009 20:27 UTC (Thu) by ricwheeler (subscriber, #4980)
In reply to: ext4 and data loss by JoeBuck
Parent article: ext4 and data loss

You clearly don't want to blindly call fsync or use SYNC mode for normal operation.

Most applications have reasonable points where an fsync would make sense. If I remember correctly, firefox went a bit over the top trying to keep it internal database crash resistant.

For apps that really care about performance and data integrity both, you can try to batch operations - just like databases batch multiple transactions into a single commit.

File system equivalents would be when writing a bunch of files you can write them all without fsync, then go back and reopen/fsync them as a batch - try it, it will give you close to non-fsynced performance and give you a clear sense of when data is on disk safely.


(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