Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Oct 2010 01:19:18 +0200
From:      Ivan Voras <ivoras@freebsd.org>
To:        freebsd-hackers@freebsd.org
Subject:   Re: fsync(2) manual and hdd write caching
Message-ID:  <ia7nln$piv$1@dough.gmane.org>
In-Reply-To: <20101026213618.GA3013@freebsd.org>
References:  <20101026213618.GA3013@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ia7nln$piv$1>