> fsync ( fileno (fp) );
Just recently, fsync has been changed to unconditionally call sync(),
because it has been found that fsync on very large files can take
enormous times (even hours!). This is because it wanted to sync all
the indirect blocks in addition to the changed data blocks, so it
could be unbearably slow. Now, it seems making this to sync() always
is not too wise either. Possibly the best thing would be to do
this only on substantially large files (>64M or so). Maybe making
fdatasync() work in the same shot would be nice too, before the VFS
interface will be frozen...
-- Janos - Don't worry, my address is real. I'm just bored of spam.