What that code does is stupid, yes. It shouldn't remove the original
unless the platform is win32. *Windows* (except with Transactional NTFS)
doesn't support an atomic rename, so it's no surprise that Python under
Windows doesn't either.

You're seeing a zero-length file because Tso's fix for ext4 only applies
to files being renamed on top of other files. The filesystem should be
fixed to allocate blocks on *every* commit, not just ones overwriting
existing files.

As for the program -- fsync should *not* be inserted. (Though the
unconditional os.remove() should be changed.) It's a bad thing to
ritually fsync every file before the rename for a host of reasons
described upthread. Just fix the filesystem.

-- 
Ext4 data loss
https://bugs.launchpad.net/bugs/317781
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to