aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/vnode.h
diff options
context:
space:
mode:
authorThomas Munro <tmunro@FreeBSD.org>2021-01-07 10:46:51 +0000
committerThomas Munro <tmunro@FreeBSD.org>2021-01-08 00:15:56 +0000
commita5e284038edc36b0447f1e6337419a3c0ea1788d (patch)
treedb9ff03268a0007b04d9d4b174462f364feebe69 /sys/sys/vnode.h
parent81098ca81dd09514f702f8087d01f66b6156f95c (diff)
downloadsrc-a5e284038edc36b0447f1e6337419a3c0ea1788d.tar.gz
src-a5e284038edc36b0447f1e6337419a3c0ea1788d.zip
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
Diffstat (limited to 'sys/sys/vnode.h')
-rw-r--r--sys/sys/vnode.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h
index ff1323cb8719..0eadfec02313 100644
--- a/sys/sys/vnode.h
+++ b/sys/sys/vnode.h
@@ -326,6 +326,7 @@ struct vattr {
#define IO_NOMACCHECK 0x1000 /* MAC checks unnecessary */
#define IO_BUFLOCKED 0x2000 /* ffs flag; indir buf is locked */
#define IO_RANGELOCKED 0x4000 /* range locked */
+#define IO_DATASYNC 0x8000 /* do only data I/O synchronously */
#define IO_SEQMAX 0x7F /* seq heuristic max value */
#define IO_SEQSHIFT 16 /* seq heuristic in upper 16 bits */