]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update RWF_SUPPORTED for Linux kernel 4.16 [BZ #22947]
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 3 Apr 2018 19:19:20 +0000 (12:19 -0700)
committerFangrui Song <i@maskray.me>
Fri, 27 Aug 2021 23:22:10 +0000 (16:22 -0700)
Add RWF_APPEND to RWF_SUPPORTED to support Linux kernel 4.16.

[BZ #22947]
* bits/uio-ext.h (RWF_APPEND): New.
* sysdeps/unix/sysv/linux/bits/uio-ext.h (RWF_APPEND): Likewise.
* manual/llio.texi: Document RWF_APPEND.
* misc/tst-preadvwritev2-common.c (RWF_APPEND): New.
(RWF_SUPPORTED): Add RWF_APPEND.

(cherry picked from commit f2652643d7234c08205b75f527191c2e2b35251f)

ChangeLog
bits/uio-ext.h
manual/llio.texi
misc/tst-preadvwritev2-common.c
sysdeps/unix/sysv/linux/bits/uio-ext.h

index 670c6d94b8cee241c8f1475e9eda7019f8ec85a2..bbf9af1fb8c6ed087a9a4c2dcdbeb8c464eb50d5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2018-04-03  H.J. Lu  <hongjiu.lu@intel.com>
+
+       [BZ #22947]
+       * bits/uio-ext.h (RWF_APPEND): New.
+       * sysdeps/unix/sysv/linux/bits/uio-ext.h (RWF_APPEND): Likewise.
+       * manual/llio.texi: Document RWF_APPEND.
+       * misc/tst-preadvwritev2-common.c (RWF_APPEND): New.
+       (RWF_SUPPORTED): Add RWF_APPEND.
+
 2018-03-27  Jesse Hathaway  <jesse@mbuki-mvuki.org>
 
        * sysdeps/unix/sysv/linux/getlogin_r.c (__getlogin_r_loginuid): Return
index 8c15a05d9ac664b0c9881483e12f1bfdf56449f0..d5aa06fd08ee81af476f744f27996a323f011a14 100644 (file)
@@ -28,5 +28,6 @@
 #define RWF_DSYNC      0x00000002 /* per-IO O_DSYNC.  */
 #define RWF_SYNC       0x00000004 /* per-IO O_SYNC.  */
 #define RWF_NOWAIT     0x00000008 /* per-IO nonblocking mode.  */
+#define RWF_APPEND     0x00000010 /* per-IO O_APPEND.  */
 
 #endif /* sys/uio_ext.h */
index 642e56e7109d6bf3c166889c905db213dc46ee26..7d877992d9b6fd0cfc4180bb6c355e8e9059bad9 100644 (file)
@@ -1271,6 +1271,9 @@ Per-IO synchronization as if the file was opened with @code{O_SYNC} flag.
 @item RWF_NOWAIT
 Use nonblocking mode for this operation; that is, this call to @code{preadv2}
 will fail and set @code{errno} to @code{EAGAIN} if the operation would block.
+
+@item RWF_APPEND
+Per-IO synchronization as if the file was opened with @code{O_APPEND} flag.
 @end vtable
 
 When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the
index 89fd0a3ff5a10e6a7c7da44e33275288ecfaa028..f889a21544947042cd5db1d496bc3fe60569d952 100644 (file)
@@ -34,7 +34,11 @@ do_test_with_invalid_flags (void)
 #ifndef RWF_NOWAIT
 # define RWF_NOWAIT 0
 #endif
-#define RWF_SUPPORTED  (RWF_HIPRI | RWF_DSYNC | RWF_SYNC | RWF_NOWAIT)
+#ifndef RWF_APPEND
+# define RWF_APPEND 0
+#endif
+#define RWF_SUPPORTED  (RWF_HIPRI | RWF_DSYNC | RWF_SYNC | RWF_NOWAIT \
+                        | RWF_APPEND)
   /* Set the next bit from the mask of all supported flags.  */
   int invalid_flag = RWF_SUPPORTED != 0 ? __builtin_clz (RWF_SUPPORTED) : 2;
   invalid_flag = 0x1 << ((sizeof (int) * CHAR_BIT) - invalid_flag);
index 53663ed1a2acf155bc126de68b6c33e85aa00a71..8698bc1200c12c339b981098a2add3338126d477 100644 (file)
@@ -46,6 +46,7 @@ extern ssize_t process_vm_writev (pid_t __pid, const struct iovec *__lvec,
 #define RWF_DSYNC      0x00000002 /* per-IO O_DSYNC.  */
 #define RWF_SYNC       0x00000004 /* per-IO O_SYNC.  */
 #define RWF_NOWAIT     0x00000008 /* per-IO nonblocking mode.  */
+#define RWF_APPEND     0x00000010 /* per-IO O_APPEND.  */
 
 __END_DECLS