From owner-svn-src-stable@freebsd.org Fri Jul 19 14:13:51 2019 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6DBFFA3A55; Fri, 19 Jul 2019 14:13:51 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FD436F040; Fri, 19 Jul 2019 14:13:51 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2C308221B1; Fri, 19 Jul 2019 14:13:51 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x6JEDpjB020386; Fri, 19 Jul 2019 14:13:51 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6JEDpB8020385; Fri, 19 Jul 2019 14:13:51 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201907191413.x6JEDpB8020385@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 19 Jul 2019 14:13:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r350122 - stable/12/lib/libc/sys X-SVN-Group: stable-12 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/12/lib/libc/sys X-SVN-Commit-Revision: 350122 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4FD436F040 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.943,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jul 2019 14:13:51 -0000 Author: asomers Date: Fri Jul 19 14:13:50 2019 New Revision: 350122 URL: https://svnweb.freebsd.org/changeset/base/350122 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/12/lib/libc/sys/open.2 Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/sys/open.2 ============================================================================== --- stable/12/lib/libc/sys/open.2 Fri Jul 19 14:12:11 2019 (r350121) +++ stable/12/lib/libc/sys/open.2 Fri Jul 19 14:13:50 2019 (r350122) @@ -28,7 +28,7 @@ .\" @(#)open.2 8.2 (Berkeley) 11/16/93 .\" $FreeBSD$ .\" -.Dd December 1, 2017 +.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