From owner-dev-commits-src-all@freebsd.org Fri Jan 8 03:54:13 2021 Return-Path: Delivered-To: dev-commits-src-all@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 2031F4E543D; Fri, 8 Jan 2021 03:54:13 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DBq3T0NTMz4qnS; Fri, 8 Jan 2021 03:54:13 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qt1-f175.google.com (mail-qt1-f175.google.com [209.85.160.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id F3AED2B173; Fri, 8 Jan 2021 03:54:12 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qt1-f175.google.com with SMTP id h19so5754136qtq.13; Thu, 07 Jan 2021 19:54:12 -0800 (PST) X-Gm-Message-State: AOAM531Apn6mzXBFgPQKKNQx/WRQ8kgwpNTKC+Ra6JHnOV3uc0w39KR9 JEzPGCERykT0OF6xfCNghLX3OTepQfH0QbhdVM0= X-Google-Smtp-Source: ABdhPJybwp4bXy9VMIUcrTGSbwU1C5JTJtcB5XFiDXes9J3V8xtziqa4eTGiDnBndRmLtYgkejjADXEBW993SVKqlZQ= X-Received: by 2002:aed:2e25:: with SMTP id j34mr1517182qtd.242.1610078052480; Thu, 07 Jan 2021 19:54:12 -0800 (PST) MIME-Version: 1.0 References: <202101080016.1080Gwu5034111@gitrepo.freebsd.org> In-Reply-To: <202101080016.1080Gwu5034111@gitrepo.freebsd.org> From: Kyle Evans Date: Thu, 7 Jan 2021 21:54:01 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: a5e284038edc - main - open(2): Add O_DSYNC flag. To: Thomas Munro Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2021 03:54:13 -0000 On Thu, Jan 7, 2021 at 6:17 PM Thomas Munro wrote: > > The branch main has been updated by tmunro: > > URL: https://cgit.FreeBSD.org/src/commit/?id=a5e284038edc36b0447f1e6337419a3c0ea1788d > > commit a5e284038edc36b0447f1e6337419a3c0ea1788d > Author: Thomas Munro > AuthorDate: 2021-01-07 10:46:51 +0000 > Commit: Thomas Munro > CommitDate: 2021-01-08 00:15:56 +0000 > > open(2): Add O_DSYNC flag. > > POSIX O_DSYNC means that writes include an implicit fdatasync(2), just > as O_SYNC implies fsync(2). > > VOP_WRITE() functions that understand the new IO_DATASYNC flag can act > accordingly, but we'll still pass down IO_SYNC so that file systems that > don't understand it will continue to provide the stronger O_SYNC > behaviour. > > Flag also applies to fcntl(2). > > Reviewed by: kib, delphij > Differential Revision: https://reviews.freebsd.org/D25090 > --- > lib/libc/sys/fcntl.2 | 19 +++++++++++++++++-- > lib/libc/sys/open.2 | 20 +++++++++++++------- > .../openzfs/include/os/freebsd/spl/sys/ccompile.h | 1 - > .../openzfs/include/os/freebsd/spl/sys/vnode.h | 2 ++ > sys/kern/vfs_vnops.c | 7 +++++++ > sys/sys/fcntl.h | 15 +++++++++------ > sys/sys/vnode.h | 1 + > 7 files changed, 49 insertions(+), 16 deletions(-) > > [... snip ...] > diff --git a/sys/sys/fcntl.h b/sys/sys/fcntl.h > index 2f424d173949..e2597726c53b 100644 > --- a/sys/sys/fcntl.h > +++ b/sys/sys/fcntl.h > @@ -141,8 +141,10 @@ typedef __pid_t pid_t; > return back */ > #endif > > +#define O_DSYNC 0x00800000 /* POSIX data sync */ > + > /* > - * XXX missing O_DSYNC, O_RSYNC. > + * XXX missing O_RSYNC. > */ > > #ifdef _KERNEL I think the value of O_DSYNC got resolved incorrectly in a merge conflict; O_RESOLVE_BENEATH in the just prior __BSD_VISIBLE block took 0x00800000, so I believe this should be 0x01000000. Thanks, Kyle Evans