Page MenuHomeFreeBSD

open(2): fix the description of O_FSYNC
ClosedPublic

Authored by asomers on Jun 14 2019, 7:59 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 25, 4:20 PM
Unknown Object (File)
Nov 4 2024, 8:54 AM
Unknown Object (File)
Nov 4 2024, 8:53 AM
Unknown Object (File)
Nov 4 2024, 8:53 AM
Unknown Object (File)
Nov 4 2024, 8:33 AM
Unknown Object (File)
Oct 18 2024, 10:11 AM
Unknown Object (File)
Oct 6 2024, 12:40 PM
Unknown Object (File)
Sep 22 2024, 10:15 AM
Subscribers

Details

Summary

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

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable