public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: libc-alpha@sourceware.org
Subject: Re: [PATCH 11/26] Linux: Clean up preadv2, pwritev2 system call names
Date: Thu, 27 Feb 2020 23:19:00 -0000	[thread overview]
Message-ID: <2f612614-adda-f261-9650-b88f43084877@linaro.org> (raw)
In-Reply-To: <eb11588418eb6dcc96a4fac9dc0c27c5fe43134a.1581279333.git.fweimer@redhat.com>



On 09/02/2020 17:20, Florian Weimer wrote:
> With the built-in tables __NR_preadv2 and __NR_pwritev2 are always
> defined.
> 
> The kernel has never defined __NR_preadv64v2 and __NR_pwritev64v2
> and is unlikely to do so, given that the preadv2 and pwritev2 system
> calls themselves are 64-bit.

LGTM, thanks. 

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>

> ---
>  sysdeps/unix/sysv/linux/preadv2.c     | 7 +------
>  sysdeps/unix/sysv/linux/preadv64v2.c  | 9 ++-------
>  sysdeps/unix/sysv/linux/pwritev2.c    | 4 ++--
>  sysdeps/unix/sysv/linux/pwritev64v2.c | 9 ++-------
>  4 files changed, 7 insertions(+), 22 deletions(-)
> 
> diff --git a/sysdeps/unix/sysv/linux/preadv2.c b/sysdeps/unix/sysv/linux/preadv2.c
> index 5f1a83589e..4e3aa923da 100644
> --- a/sysdeps/unix/sysv/linux/preadv2.c
> +++ b/sysdeps/unix/sysv/linux/preadv2.c
> @@ -21,20 +21,15 @@
>  
>  #ifndef __OFF_T_MATCHES_OFF64_T
>  
> -# if !defined (__NR_preadv2) && defined (__NR_pread64v2)
> -#  define __NR_preadv2 __NR_pread64v2
> -# endif
> -
>  ssize_t
>  preadv2 (int fd, const struct iovec *vector, int count, off_t offset,
>  	 int flags)
>  {
> -# ifdef __NR_preadv2
>    ssize_t result = SYSCALL_CANCEL (preadv2, fd, vector, count,
>  				   LO_HI_LONG (offset), flags);
>    if (result >= 0 || errno != ENOSYS)
>      return result;
> -# endif
> +
>    /* Trying to emulate the preadv2 syscall flags is troublesome:
>  
>       * We can not temporary change the file state of the O_DSYNC and O_SYNC

Ok.

> diff --git a/sysdeps/unix/sysv/linux/preadv64v2.c b/sysdeps/unix/sysv/linux/preadv64v2.c
> index f1e52711cb..1bf1a4c696 100644
> --- a/sysdeps/unix/sysv/linux/preadv64v2.c
> +++ b/sysdeps/unix/sysv/linux/preadv64v2.c
> @@ -19,20 +19,15 @@
>  #include <sys/uio.h>
>  #include <sysdep-cancel.h>
>  
> -#if !defined(__NR_preadv64v2) && defined(__NR_preadv2)
> -# define __NR_preadv64v2 __NR_preadv2
> -#endif
> -
>  ssize_t
>  preadv64v2 (int fd, const struct iovec *vector, int count, off64_t offset,
>  	    int flags)
>  {
> -#ifdef __NR_preadv64v2
> -  ssize_t result = SYSCALL_CANCEL (preadv64v2, fd, vector, count,
> +  ssize_t result = SYSCALL_CANCEL (preadv2, fd, vector, count,
>  				   LO_HI_LONG (offset), flags);
>    if (result >= 0 || errno != ENOSYS)
>      return result;
> -#endif
> +
>    /* Trying to emulate the preadv2 syscall flags is troublesome:
>  
>       * We can not temporary change the file state of the O_DSYNC and O_SYNC

Ok.

> diff --git a/sysdeps/unix/sysv/linux/pwritev2.c b/sysdeps/unix/sysv/linux/pwritev2.c
> index 53ab5e7613..a179654970 100644
> --- a/sysdeps/unix/sysv/linux/pwritev2.c
> +++ b/sysdeps/unix/sysv/linux/pwritev2.c
> @@ -25,12 +25,12 @@ ssize_t
>  pwritev2 (int fd, const struct iovec *vector, int count, off_t offset,
>  	  int flags)
>  {
> -# ifdef __NR_pwritev2
> +
>    ssize_t result = SYSCALL_CANCEL (pwritev2, fd, vector, count,
>  				   LO_HI_LONG (offset), flags);
>    if (result >= 0 || errno != ENOSYS)
>      return result;
> -# endif
> +
>    /* Trying to emulate the pwritev2 syscall flags is troublesome:
>  
>       * We can not temporary change the file state of the O_DSYNC and O_SYNC

Ok.

> diff --git a/sysdeps/unix/sysv/linux/pwritev64v2.c b/sysdeps/unix/sysv/linux/pwritev64v2.c
> index ba95eefcd9..8df32528b7 100644
> --- a/sysdeps/unix/sysv/linux/pwritev64v2.c
> +++ b/sysdeps/unix/sysv/linux/pwritev64v2.c
> @@ -19,20 +19,15 @@
>  #include <sys/uio.h>
>  #include <sysdep-cancel.h>
>  
> -#if !defined(__NR_pwritev64v2) && defined(__NR_pwritev2)
> -# define __NR_pwritev64v2 __NR_pwritev2
> -#endif
> -
>  ssize_t
>  pwritev64v2 (int fd, const struct iovec *vector, int count, off64_t offset,
>  	     int flags)
>  {
> -#ifdef __NR_pwritev64v2
> -  ssize_t result = SYSCALL_CANCEL (pwritev64v2, fd, vector, count,
> +  ssize_t result = SYSCALL_CANCEL (pwritev2, fd, vector, count,
>  				   LO_HI_LONG (offset), flags);
>    if (result >= 0 || errno != ENOSYS)
>      return result;
> -#endif
> +
>    /* Trying to emulate the pwritev2 syscall flags is troublesome:
>  
>       * We can not temporary change the file state of the O_DSYNC and O_SYNC
> 


Ok.

  reply	other threads:[~2020-02-27 23:19 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-09 20:19 [PATCH 00/26] Linux cleanups enabled by built-in system call tables Florian Weimer
2020-02-09 20:19 ` [PATCH 04/26] Linux: mlock2 syscall number is always available Florian Weimer
2020-02-27 23:06   ` Adhemerval Zanella
2020-02-09 20:19 ` [PATCH 01/26] Linux: Enhance glibcsyscalls.h to support listing system calls Florian Weimer
2020-02-27 22:14   ` Adhemerval Zanella
2020-05-11 10:10     ` Florian Weimer
2020-02-09 20:19 ` [PATCH 03/26] Linux: copy_file_range syscall number is always available Florian Weimer
2020-02-27 23:06   ` Adhemerval Zanella
2020-02-09 20:19 ` [PATCH 02/26] Linux: renameat2 " Florian Weimer
2020-02-27 23:06   ` Adhemerval Zanella
2020-02-09 20:20 ` [PATCH 11/26] Linux: Clean up preadv2, pwritev2 system call names Florian Weimer
2020-02-27 23:19   ` Adhemerval Zanella [this message]
2020-02-09 20:20 ` [PATCH 12/26] Linux: Clean up preadv, pwritev " Florian Weimer
2020-02-27 23:19   ` Adhemerval Zanella
2020-02-09 20:20 ` [PATCH 05/26] Linux: mq_* syscall numbers are always available Florian Weimer
2020-02-27 23:06   ` Adhemerval Zanella
2020-02-09 20:20 ` [PATCH 13/26] Linux: getrandom syscall number is " Florian Weimer
2020-02-27 23:20   ` Adhemerval Zanella
2020-02-09 20:20 ` [PATCH 06/26] Linux: statx " Florian Weimer
2020-02-27 23:06   ` Adhemerval Zanella
2020-02-09 20:20 ` [PATCH 10/26] Linux: Clean up pread64/pwrite64 system call names Florian Weimer
2020-02-27 23:08   ` Adhemerval Zanella
2020-02-09 20:20 ` [PATCH 09/26] Linux: sigaltstack syscall number is always available Florian Weimer
2020-02-27 23:06   ` Adhemerval Zanella
2020-02-09 20:20 ` [PATCH 15/26] Linux: pkey_mprotect " Florian Weimer
2020-02-27 23:31   ` Adhemerval Zanella
2020-02-09 20:20 ` [PATCH 07/26] Linux: sched_setaffinity " Florian Weimer
2020-02-27 23:06   ` Adhemerval Zanella
2020-02-09 20:20 ` [PATCH 08/26] Linux: sched_getaffinity " Florian Weimer
2020-02-27 23:06   ` Adhemerval Zanella
2020-02-09 20:20 ` [PATCH 14/26] Linux: rt_sigqueueinfo " Florian Weimer
2020-02-27 23:31   ` Adhemerval Zanella
2020-02-09 20:21 ` [PATCH 20/26] Linux: set_robust_list " Florian Weimer
2020-02-27 23:46   ` Adhemerval Zanella
2020-02-09 20:21 ` [PATCH 24/26] Linux: epoll_pwait " Florian Weimer
2020-02-27 23:47   ` Adhemerval Zanella
2020-02-09 20:21 ` [PATCH 21/26] Linux: open_by_handle_at " Florian Weimer
2020-02-27 23:46   ` Adhemerval Zanella
2020-02-09 20:21 ` [PATCH 23/26] x86_64: Do not define __NR_semtimedop in <sysdep.h> Florian Weimer
2020-02-27 23:46   ` Adhemerval Zanella
2020-02-09 20:21 ` [PATCH 19/26] Linux: pciconfig_iobase syscall number is always available on alpha Florian Weimer
2020-02-27 23:31   ` Adhemerval Zanella
2020-02-09 20:21 ` [PATCH 17/26] Linux: exit_group syscall number is always available Florian Weimer
2020-02-27 23:31   ` Adhemerval Zanella
2020-02-09 20:21 ` [PATCH 22/26] ia64: Do not define __NR_semtimedop in <sysdep.h> Florian Weimer
2020-02-27 23:46   ` Adhemerval Zanella
2020-02-09 20:21 ` [PATCH 18/26] Linux: getdents64 syscall number is always available on MIPS Florian Weimer
2020-02-27 23:31   ` Adhemerval Zanella
2020-02-09 20:21 ` [PATCH 26/26] microblaze: vfork is always available Florian Weimer
2020-02-27 23:47   ` Adhemerval Zanella
2020-02-09 20:21 ` [PATCH 16/26] Linux: set_tid_address syscall number " Florian Weimer
2020-02-27 23:31   ` Adhemerval Zanella
2020-02-09 20:21 ` [PATCH 25/26] m68k: getpagesize " Florian Weimer
2020-02-27 23:47   ` Adhemerval Zanella
2020-02-10 23:25 ` [PATCH 00/26] Linux cleanups enabled by built-in system call tables Lukasz Majewski
2020-02-10 23:56   ` Joseph Myers
2020-02-11  7:47   ` Florian Weimer
2020-02-11 11:07     ` Florian Weimer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2f612614-adda-f261-9650-b88f43084877@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).