On Fri, May 17, 2013 at 5:18 PM, Bert Huijben <b...@qqmail.nl> wrote: > > Are you sure this resolves your actual problem ? > Yes, it fixes txn-current and current file corruptions.
> For really small files Windows doesn't create a full on disk > representation of the file and stores the data inside the MFT. > > Given that the reproduction requires a hardware failure I'm not sure if > we are just slowing down to resolve/hide symptoms instead of resolving > the problem. > > Introducing a major sleep operation would probably resolve the same > symptom as it would make it unlikely to kill the power exactly at the > right point in time. > > The journaling properties of ntfs and other similarly designed file > systems should have removed the full flush requirements as each > operation is only performed after committing the journal. > NTFS journal is not solution, because write and move operations are not serialized. Actually write operation performed after move on NTFS layer: * In normal conditions write will be performed to new file location without problem * But on power failure move operations is performed (since it's already written to journal), while write didn't. FlushFileBuffers solves this problem. It says 'please move data from OS cache to NTFS journal' so move operation will be performed after write. So I think my solution is correct. But we have other places where we use write, close, rename sequence without flushing. -- Ivan Zhakov VisualSVN Team