Date: Fri, 19 Jul 2019 14:23:23 +0000 (UTC) From: Alan Somers <asomers@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r350125 - stable/11/lib/libc/sys Message-ID: <201907191423.x6JENN3D026356@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: asomers Date: Fri Jul 19 14:23:23 2019 New Revision: 350125 URL: https://svnweb.freebsd.org/changeset/base/350125 Log: MFC r349041: 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 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20641 Modified: stable/11/lib/libc/sys/open.2 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/sys/open.2 ============================================================================== --- stable/11/lib/libc/sys/open.2 Fri Jul 19 14:22:24 2019 (r350124) +++ stable/11/lib/libc/sys/open.2 Fri Jul 19 14:23:23 2019 (r350125) @@ -28,7 +28,7 @@ .\" @(#)open.2 8.2 (Berkeley) 11/16/93 .\" $FreeBSD$ .\" -.Dd March 28, 2018 +.Dd June 14, 2019 .Dt OPEN 2 .Os .Sh NAME @@ -183,10 +183,7 @@ The descriptor remains in non-blocking mode for subseq If .Dv O_FSYNC is used in the mask, all writes will -immediately be written to disk, -the kernel will not cache written data -and all writes on the descriptor will not return until -the data to be written completes. +immediately and synchronously be written to disk. .Pp .Dv O_SYNC is a synonym for
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201907191423.x6JENN3D026356>