This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Consolidate Linux sync_file_range implementations



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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]