Maxime Devos <maximede...@telenet.be> writes: > So, I'm nominally 'on hiatus', but I noticed this mail, and noticed > you copied a file (and fsync'ed it), but forgot to fsync the directory > it was copied to -- from what I've read (but I don't recall the > source), fsyncing the contents of the file isn't enough, you also need > to fsync the directory such that the new file entry is in the > directory after crashing.
Ohh indeed! The Linux manpage on fsync confirms it. That invalidates my fsync testing. Which was on a codepath that, as Ludo found out, did not even run. But I will remember to fsync the directory in the future. Thank you very much Maxime! Regards, Florian