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)
Feb 15 2024, 12:52 PM
Unknown Object (File)
Feb 11 2024, 4:38 PM
Unknown Object (File)
Jan 16 2024, 8:00 AM
Unknown Object (File)
Dec 22 2023, 11:12 PM
Unknown Object (File)
Dec 21 2023, 8:08 PM
Unknown Object (File)
Oct 30 2023, 12:42 PM
Unknown Object (File)
Oct 10 2023, 6:42 PM
Unknown Object (File)
Sep 5 2023, 9:43 PM
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 Passed
Unit
No Test Coverage
Build Status
Buildable 24853
Build 23602: arc lint + arc unit