From patchwork Tue Apr 3 18:18:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 26574 Received: (qmail 112573 invoked by alias); 3 Apr 2018 18:18:52 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 112563 invoked by uid 89); 3 Apr 2018 18:18:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.3 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-oi0-f67.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=qeTwBgMdvOpizE4VLlAwNn6/DFLgap7A94d2byDs54s=; b=aNvx2hV+joYtT/kxGlaIiOX+UPD7+QTBOi0ZjUGvLXrFFhS3QmmcrlvKW2Ozo/tHO2 Gp98zdLRGD/4Ysacl7oUS7dW8XX3pRRrGGCGbSRi8l1wedLv2hFFIANn5V+6nr7QeNMm Wi/bhklOkgfE1g6KTkE2JhqlqIcuqDEYe0M3Ohcl66xV6oUtT+Ht3YK9ogFvDDFr2fG1 1xpZXvSlpTL4Ulo+7LEHJPoiaTHFQ5yV2xLc+IOcxTzbr7Ejpjy0zjkft8p6ENgGCf9U YdKVon703hKu9ItsFHWvSQNvSUkQKALSeVdIAJrYx/mLCFPsgk8Z0bQYVxl4U/pPZR/7 s/Kw== X-Gm-Message-State: ALQs6tBPCpQGrs1ijoqGVIAJfarCpm5zEmMUbjEOv6BcmIdzzQ3Jt6kI BpKSE6pGW8ZvtEu2fQVPfE60QEjcKBSo765q2I0= X-Google-Smtp-Source: AIpwx49D/L3yZTGRs/rCFVXLKJk2vhHnK0qKhn66j9MMYn8qOH/mXbqeEMXKK+AzsWUXLXQS8lOxBo9iseISF2OHFzA= X-Received: by 2002:aca:c743:: with SMTP id x64-v6mr8626718oif.100.1522779528290; Tue, 03 Apr 2018 11:18:48 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <20180403160731.GA29605@intel.com> From: "H.J. Lu" Date: Tue, 3 Apr 2018 11:18:47 -0700 Message-ID: Subject: Re: [PATCH] Update RWF_SUPPORTED for Linux kernel 4.16 [BZ #22947] To: Adhemerval Zanella Cc: GNU C Library On Tue, Apr 3, 2018 at 9:15 AM, Adhemerval Zanella wrote: > > > On 03/04/2018 13:07, H.J. Lu wrote: >> Add RWF_APPEND to RWF_SUPPORTED to support Linux kernel 4.16. >> >> OK for master? > > Now 4.16 is out we need to update sysdeps/unix/sysv/linux/bits/uio-ext.h, > bits/uio-ext.h, and manual/llio.texi as well. > Here is the updated patch. OK for master? From c5752a44152a097609c7a2898fdf0c88d5b4a17f Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 14 Mar 2018 09:54:28 -0700 Subject: [PATCH] Update RWF_SUPPORTED for Linux kernel 4.16 [BZ #22947] 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. --- bits/uio-ext.h | 1 + manual/llio.texi | 3 +++ misc/tst-preadvwritev2-common.c | 6 +++++- sysdeps/unix/sysv/linux/bits/uio-ext.h | 1 + 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/bits/uio-ext.h b/bits/uio-ext.h index 8c15a05d9a..d5aa06fd08 100644 --- a/bits/uio-ext.h +++ b/bits/uio-ext.h @@ -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 */ diff --git a/manual/llio.texi b/manual/llio.texi index b4fd5e1d91..82f03be2be 100644 --- a/manual/llio.texi +++ b/manual/llio.texi @@ -1275,6 +1275,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 diff --git a/misc/tst-preadvwritev2-common.c b/misc/tst-preadvwritev2-common.c index 89fd0a3ff5..f889a21544 100644 --- a/misc/tst-preadvwritev2-common.c +++ b/misc/tst-preadvwritev2-common.c @@ -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); diff --git a/sysdeps/unix/sysv/linux/bits/uio-ext.h b/sysdeps/unix/sysv/linux/bits/uio-ext.h index 53663ed1a2..8698bc1200 100644 --- a/sysdeps/unix/sysv/linux/bits/uio-ext.h +++ b/sysdeps/unix/sysv/linux/bits/uio-ext.h @@ -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 -- 2.14.3