On 06/08/2010 02:14 PM, Theodore Tso wrote:
If you pull the plug without fsyncing the file, you will end up with a zero-length file -- or possibly no file at all, even with data=ordered. If you really want to preserve data after pulling the power cord immediately after a write were the application hasn't done an fsync() or a sync() call, you can mount the file system with the mount option -o sync --- but then the performance will be horrible.
It's all a tradeoff of what you think is important....
I think you should either get the old file, or the new file (if you
don't fsync), and not some random data from another file.