]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
open(2): Add O_DSYNC flag.
authorThomas Munro <tmunro@FreeBSD.org>
Thu, 7 Jan 2021 10:46:51 +0000 (23:46 +1300)
committerThomas Munro <tmunro@FreeBSD.org>
Fri, 8 Jan 2021 00:15:56 +0000 (13:15 +1300)
commita5e284038edc36b0447f1e6337419a3c0ea1788d
treedb9ff03268a0007b04d9d4b174462f364feebe69
parent81098ca81dd09514f702f8087d01f66b6156f95c
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
lib/libc/sys/open.2
sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h
sys/contrib/openzfs/include/os/freebsd/spl/sys/vnode.h
sys/kern/vfs_vnops.c
sys/sys/fcntl.h
sys/sys/vnode.h