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)
Thu, May 2, 11:13 PM
Unknown Object (File)
Thu, May 2, 10:59 PM
Unknown Object (File)
Thu, May 2, 10:49 PM
Unknown Object (File)
Thu, May 2, 7:53 PM
Unknown Object (File)
Sat, Apr 27, 6:18 AM
Unknown Object (File)
Feb 15 2024, 12:52 PM
Unknown Object (File)
Feb 11 2024, 4:38 PM
Unknown Object (File)
Jan 16 2024, 8:00 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