Hacker News new | past | comments | ask | show | jobs | submit login

In the case of atomic file writing, the rename() doesn't cause a fsync of the parent directory?



> rename() doesn't cause a fsync of the parent directory?

It does not.

At best it will schedule a journal commit asynchronously (I recall that ext4 maintainer complained about adding this "workaround for buggy user code" on lkml). If you want to receive an IO error when renaming fails, make sure to call fsync() yourself.


Depends on the file system. In NFS, yes. In others, maybe not.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: