aboutsummaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorThomas Munro <tmunro@FreeBSD.org>2021-01-07 11:11:38 +0000
committerThomas Munro <tmunro@FreeBSD.org>2021-01-08 00:15:56 +0000
commit801ac943ea0821bbb34c69688a7e7bb126d8cf8d (patch)
treef8dbf70fce887db9d515c27a03e11f37c883e125 /lib/libc
parente7347be9e34d05130df878d6af2ff847227610b6 (diff)
downloadsrc-801ac943ea0821bbb34c69688a7e7bb126d8cf8d.tar.gz
src-801ac943ea0821bbb34c69688a7e7bb126d8cf8d.zip
aio_fsync(2): Support O_DSYNC.
aio_fsync(O_DSYNC, ...) is the asynchronous version of fdatasync(2). Reviewed by: kib, asomers, jhb Differential Review: https://reviews.freebsd.org/D25071
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/sys/aio_fsync.218
1 files changed, 14 insertions, 4 deletions
diff --git a/lib/libc/sys/aio_fsync.2 b/lib/libc/sys/aio_fsync.2
index 9d5d143416b3..0ce47edfb33f 100644
--- a/lib/libc/sys/aio_fsync.2
+++ b/lib/libc/sys/aio_fsync.2
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd August 19, 2016
+.Dd January 6, 2021
.Dt AIO_FSYNC 2
.Os
.Sh NAME
@@ -49,11 +49,15 @@ completed at the time the call returns.
.Pp
The
.Fa op
-argument can only be set to
+argument can be set to
.Dv O_SYNC
to cause all currently queued I/O operations to be completed
as if by a call to
-.Xr fsync 2 .
+.Xr fsync 2 ,
+or
+.Dv O_DSYNC
+for the behavior of
+.Xr fdatasync 2 .
.Pp
If _POSIX_PRIORITIZED_IO is defined, and the descriptor supports it,
then the enqueued operation is submitted at a priority equal to that
@@ -112,7 +116,9 @@ are unsafe and unsafe asynchronous I/O operations are disabled.
A value of the
.Fa op
argument is not set to
-.Dv O_SYNC .
+.Dv O_SYNC
+or
+.Dv O_DSYNC .
.El
.Pp
The following conditions may be synchronously detected when the
@@ -176,3 +182,7 @@ The
.Fn aio_fsync
system call first appeared in
.Fx 7.0 .
+The
+.Dv O_DSYNC
+option appeared in
+.Fx 13.0 .