]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
open(2): fix the description of O_FSYNC
authorasomers <asomers@FreeBSD.org>
Fri, 14 Jun 2019 20:35:37 +0000 (20:35 +0000)
committerasomers <asomers@FreeBSD.org>
Fri, 14 Jun 2019 20:35:37 +0000 (20:35 +0000)
commitba20317d8368b018aeac257460692667a61fba63
tree9bcfeaac64488081a46fd4f16f610d5f89e72c52
parentd36b8746db91d7921eb81941847838872800ce33
open(2): fix the description of O_FSYNC

The man page claims that with O_FSYNC (aka O_SYNC) the kernel will not cache
written data. However, that's not true. Nor does POSIX require it.
Perhaps it was true when that section of the man page was written in r69336
(I haven't checked). But it's not true now.  Now the effect is simply that
writes are sent to disk immediately and synchronously, but they're still
cached.

See also: https://pubs.opengroup.org/onlinepubs/9699919799/
See also: ffs_write in sys/ufs/ffs/ffs_vnops.c

Reviewed by: cem
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D20641
lib/libc/sys/open.2