fsync(2) manual and hdd write caching

perryh at pluto.rain.com perryh at pluto.rain.com
Thu Oct 28 08:11:32 UTC 2010


Ivan Voras <ivoras at freebsd.org> wrote:

> ... The problem is actually pretty hard - since AFAIK SoftUpdates
> doesn't have "checkpoints" in the sense that it groups writes and
> all data "before" can guaranteed to be on-disk, the problem is
> *when* to issue BIO_FLUSH requests.

Seems to me the originally-stated problem -- making fsync(2)
do what it claims to do -- is not hard at all.  Just issue a
BIO_FLUSH request as the final step in handling fsync(2).

While we're at it, perhaps do the same in close(2).
I _hope_ we are already doing it in unmount(2).


More information about the freebsd-hackers mailing list