@Volodymyr,
You can only fsync given a file descriptor, but I think writing an fsync
binary that opens the file read-only, fsync on the descriptor, and close
the file, should work.
--
Ext4 data loss
https://bugs.launchpad.net/bugs/317781
You received this bug notification because you are a
I wrote something similar, but with one change -- it turns out you must
have write access to the file you want to fsync (or fdatasync).
It seems to work, but I have not had time to do a power loss simulation.
Would be useful performance-wise on any system but ext3 (where calling
this is identical
@Olaf
from the manpage, fsync() transfers all modified in-core data of the
file referred to by the file descriptor fd. So it should really be all
pending writes, not just the writes that take place using the current
fd.
I cannot really reboot any of my machines right now, but it does make
sense.