> I was also (incorrectly) assuming that renaming a file after having fsynced the contents is a valid mechanism
Where does anyone say that this doesn't work?
I read the article twice and it suggests that open+write+fsync+close+dir-fsync is safe ("We've now seen what we have to do to write a file safely").
I've also read the reference "Bornholt et al., ASPLOS’16" mentioned in the "Rename" section; it says "One possible fix is to add an fsync(fd)". I cannot find another place in that paper that says otherwise. The later analysed Atomic-replace-via-rename (ARVR) and Atomic-create-via-rename (ACVR) approaches skip the fsync.
That said, user "tfha" replied to your linked thread
> I can confirm experimentally that the rename trick is not good enough.
but unfortunately without any data on whether the directory was fsynced, or on which file system.
So I'd like to ask again:
Is there any evidence that open+write+fsync+close+dir-fsync does not work?