Date: Thu, 7 Jan 2021 21:54:01 -0600 From: Kyle Evans <kevans@freebsd.org> To: Thomas Munro <tmunro@freebsd.org> Cc: src-committers <src-committers@freebsd.org>, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: a5e284038edc - main - open(2): Add O_DSYNC flag. Message-ID: <CACNAnaFV=_x9PdV6TD65e8LNfeMqNRX1UnxEA7VN7LLj8XUoAg@mail.gmail.com> In-Reply-To: <202101080016.1080Gwu5034111@gitrepo.freebsd.org> References: <202101080016.1080Gwu5034111@gitrepo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jan 7, 2021 at 6:17 PM Thomas Munro <tmunro@freebsd.org> wrote: > > The branch main has been updated by tmunro: > > URL: https://cgit.FreeBSD.org/src/commit/?id=a5e284038edc36b0447f1e6337419a3c0ea1788d > > commit a5e284038edc36b0447f1e6337419a3c0ea1788d > Author: Thomas Munro <tmunro@FreeBSD.org> > AuthorDate: 2021-01-07 10:46:51 +0000 > Commit: Thomas Munro <tmunro@FreeBSD.org> > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACNAnaFV=_x9PdV6TD65e8LNfeMqNRX1UnxEA7VN7LLj8XUoAg>