diff options
author | Konstantin Belousov <kib@FreeBSD.org> | 2016-08-15 19:08:51 +0000 |
---|---|---|
committer | Konstantin Belousov <kib@FreeBSD.org> | 2016-08-15 19:08:51 +0000 |
commit | 295af703a0d7987c6cf4987e7b7f5f07b3ca1221 (patch) | |
tree | 09514f30b39e5d47e38d43412999fff4ebdf4fd2 /include/unistd.h | |
parent | 576a9e496f956ab17d829716a29e5972e7d3f899 (diff) | |
download | src-295af703a0d7987c6cf4987e7b7f5f07b3ca1221.tar.gz src-295af703a0d7987c6cf4987e7b7f5f07b3ca1221.zip |
Add an implementation of fdatasync(2).
The syscall is a trivial wrapper around new VOP_FDATASYNC(), sharing
code with fsync(2). For all filesystems, this commit provides the
implementation which delegates the work of VOP_FDATASYNC() to
VOP_FSYNC(). This is functionally correct but not efficient.
This is not yet POSIX-compliant implementation, because it does not
ensure that queued AIO requests are completed before returning.
Reviewed by: mckusick
Discussed with: avg (ZFS), jhb (AIO part)
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D7471
Notes
Notes:
svn path=/head/; revision=304176
Diffstat (limited to 'include/unistd.h')
-rw-r--r-- | include/unistd.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/unistd.h b/include/unistd.h index 0fb36e50e050..eab79f20eb7d 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -384,6 +384,7 @@ extern int optind, opterr, optopt; /* ISO/IEC 9945-1: 1996 */ #if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE int fsync(int); +int fdatasync(int); /* * ftruncate() was in the POSIX Realtime Extension (it's used for shared |