This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Consolidate Linux sync_file_range implementations
- From: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- To: Yury Norov <ynorov at caviumnetworks dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Tue, 11 Oct 2016 11:05:23 -0300
- Subject: Re: [PATCH] Consolidate Linux sync_file_range implementations
- Authentication-results: sourceware.org; auth=none
- References: <1476133082-27968-1-git-send-email-adhemerval.zanella@linaro.org> <20161011111608.GA4448@yury-N73SV>
On 11/10/2016 08:16, Yury Norov wrote:
> Hi,
>
> Tested on aarch64/lp64 and aarch64/ilp32
>
> Few minor comments below
>
> Yury.
>
> On Mon, Oct 10, 2016 at 05:58:02PM -0300, Adhemerval Zanella wrote:
>> This patch consolidates all the sync_file_Range implementation for Linux
>
> sync_file_Range - typo?
Oops, I will fix it.
>> diff --git a/sysdeps/unix/sysv/linux/sync_file_range.c b/sysdeps/unix/sysv/linux/sync_file_range.c
>> index a8f4214..6797488 100644
>> --- a/sysdeps/unix/sysv/linux/sync_file_range.c
>> +++ b/sysdeps/unix/sysv/linux/sync_file_range.c
>> @@ -16,37 +16,18 @@
>> License along with the GNU C Library; if not, see
>> <http://www.gnu.org/licenses/>. */
>>
>> -#include <errno.h>
>> #include <fcntl.h>
>> -#include <sys/types.h>
>> -
>> #include <sysdep-cancel.h>
>> -#include <sys/syscall.h>
>> -
>>
>> -#ifdef __NR_sync_file_range
>> int
>> -sync_file_range (int fd, __off64_t from, __off64_t to, unsigned int flags)
>> +sync_file_range (int fd, __off64_t offset, __off64_t len, unsigned int flags)
>> {
>> +#if defined(__NR_sync_file_range2)
>
> Whitespace before brace?
Ack.
>
>> + return SYSCALL_CANCEL (sync_file_range2, fd, flags, SYSCALL_LL64 (offset),
>> + SYSCALL_LL64 (len));
>> +#elif defined(__NR_sync_file_range)
>
> And here.
Ack.