public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] Add SYNC_FILE_RANGE_WRITE_AND_WAIT from Linux 5.2 to bits/fcntl-linux.h.
@ 2019-08-07 17:01 Joseph Myers
0 siblings, 0 replies; only message in thread
From: Joseph Myers @ 2019-08-07 17:01 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a02cd8e4e091201cb395a805a9f3e2a9981cae37
commit a02cd8e4e091201cb395a805a9f3e2a9981cae37
Author: Joseph Myers <joseph@codesourcery.com>
Date: Wed Aug 7 17:01:13 2019 +0000
Add SYNC_FILE_RANGE_WRITE_AND_WAIT from Linux 5.2 to bits/fcntl-linux.h.
This patch adds the SYNC_FILE_RANGE_WRITE_AND_WAIT constant from Linux
5.2 (a new name for a combination of existing bits, not actually a new
kernel interface) to bits/fcntl-linux.h.
Tested for x86_64.
* sysdeps/unix/sysv/linux/bits/fcntl-linux.h [__USE_GNU]
(SYNC_FILE_RANGE_WRITE_AND_WAIT): New macro.
Diff:
---
ChangeLog | 5 +++++
sysdeps/unix/sysv/linux/bits/fcntl-linux.h | 5 +++++
2 files changed, 10 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 53ccbf5..760698b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2019-08-07 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/bits/fcntl-linux.h [__USE_GNU]
+ (SYNC_FILE_RANGE_WRITE_AND_WAIT): New macro.
+
2019-08-06 Joseph Myers <joseph@codesourcery.com>
* io/fcntl.h [__USE_GNU] (AT_RECURSIVE): New macro.
diff --git a/sysdeps/unix/sysv/linux/bits/fcntl-linux.h b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
index 3f32eb3..ad9bf1b 100644
--- a/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
+++ b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
@@ -334,6 +334,11 @@ struct f_owner_ex
# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in
the range after performing the
write. */
+/* SYNC_FILE_RANGE_WRITE_AND_WAIT ensures all pages in the range are
+ written to disk before returning. */
+# define SYNC_FILE_RANGE_WRITE_AND_WAIT (SYNC_FILE_RANGE_WRITE \
+ | SYNC_FILE_RANGE_WAIT_BEFORE \
+ | SYNC_FILE_RANGE_WAIT_AFTER)
/* Flags for SPLICE and VMSPLICE. */
# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-08-07 17:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-07 17:01 [glibc] Add SYNC_FILE_RANGE_WRITE_AND_WAIT from Linux 5.2 to bits/fcntl-linux.h Joseph Myers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).