On 5 Jan 2009, at 20:51, Geir Magnusson Jr. wrote:
fsync() on Linux and OS X flushes to disk. I'm not suggesting that
it doesn't.
What it doesn't do is flush the write caches *on* the disk unit
itself (which is what F_FULLSYNC supposedly does, hence the sloth)
IOW, with fsync(), there's no guarantee that the bits get written to
the physical media. As far as the OS knows, the FS caches are
flushed to the device, but the device may still be holding in it's
own RAM.
We haven't gotten any data-loss reports on Linux systems
using fsync(). We did for Mac OS X prior to the F_FULLFSYNC
patch in Erlang.
re the FULLFSYNC change, do you have the option to not have it used,
but have fsync() used instead?
Nope, file:fsync() (Erlang) calls fsync() (C) on Linux and
fcntl(F_FULLFSYNC) (C) on Darwin-based OSes, this is
hardcoded.
If necessary and possible, we'll patch the Erlang VM.
That seems like a bad idea to me - I'd think you'd want to stay out
of the VM business.
We are pushing the Erlang VM in various ways. So far,
feedback was very welcome by the VM developers and
we were encouraged to keep this up. Note, that the code
of the VM is tightly controlled and patches are evaluated
thoroughly by Ericsson.
Cheers
Jan
--