]> sourceware.org Git - glibc.git/commitdiff
Add SYNC_FILE_RANGE_WRITE_AND_WAIT from Linux 5.2 to bits/fcntl-linux.h.
authorJoseph Myers <joseph@codesourcery.com>
Wed, 7 Aug 2019 17:01:13 +0000 (17:01 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Wed, 7 Aug 2019 17:01:13 +0000 (17:01 +0000)
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.

ChangeLog
sysdeps/unix/sysv/linux/bits/fcntl-linux.h

index 53ccbf5e9e3976182d5e2c628faf303ad2a8c341..760698b4409224f6e176e063a1b830c914eadda3 100644 (file)
--- 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.
index 3f32eb328b13f5b3d76338cbb59ccd661b3ff313..ad9bf1b24b00887ae31f3aafc9f3c5ca0b310c6b 100644 (file)
@@ -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.  */
This page took 0.078165 seconds and 5 git commands to generate.