fsync(2) manual and hdd write caching
Ivan Voras
ivoras at freebsd.org
Tue Oct 26 23:19:31 UTC 2010
On 10/26/10 23:36, Alexander Best wrote:
> hi there,
>
> since there's a thread on freebsd-questions@ concerning fsync(2) and the fact
> that hdd write caching can cause this syscall to basically be a no op, could
> somebody please copy the BUGS section from sync(2) to fsync(2)?
I don't think they are the same.
The "buffers" of sync(2) are not those from the discussion on fsync(2)
safety. Or more correctly, they are but those 2 calls work on a
different scope.
fsync(2) actually does behave as advertised, "auses all modified data
and attributes of fd to be moved to a permanent storage device". It is
the problem of the "permanent storage device" if it caches this data
further.
More information about the freebsd-hackers
mailing list