Re: Use copy_file_range system call for copying on Linux systems

2022-02-16 Thread Brian Burkhalter
On Feb 16, 2022, at 12:10 PM, Alan Bateman mailto:alan.bate...@oracle.com>> wrote: I suspect Ilya meant using syscall(2) with the NR. We had code in libnio that used approach for the *at functions before they were added to the glibc header files. It's a bit fragile as they are architecture s

Re: Use copy_file_range system call for copying on Linux systems

2022-02-16 Thread Alan Bateman
On 16/02/2022 20:03, Brian Burkhalter wrote: On Feb 16, 2022, at 9:51 AM, Ilya Starchenko wrote: I think we can just check if syscall return ENOSYS and if it’s true fail back to more generic code. The code would not even build without the syscall in the headers so I don’t think so. I s

Re: Use copy_file_range system call for copying on Linux systems

2022-02-16 Thread Brian Burkhalter
On Feb 16, 2022, at 9:51 AM, Ilya Starchenko mailto:redux1234...@mail.ru>> wrote: I think we can just check if syscall return ENOSYS and if it’s true fail back to more generic code. The code would not even build without the syscall in the headers so I don’t think so. Brian

Re: Use copy_file_range system call for copying on Linux systems

2022-02-16 Thread Brian Burkhalter
On Feb 16, 2022, at 5:40 AM, Alan Bateman mailto:alan.bate...@oracle.com>> wrote: On 16/02/2022 13:13, Ilya Starchenko wrote: I have suggestion. Copy_file_range() has been introduced in the Linux kernel since version 4.5. system call performs an in-kernel copy between two file descriptors wi

Re: Use copy_file_range system call for copying on Linux systems

2022-02-16 Thread Alan Bateman
On 16/02/2022 13:13, Ilya Starchenko wrote: I have suggestion. Copy_file_range() has been introduced in the Linux kernel since version 4.5. system call performs an in-kernel copy between two file descriptors without the additional cost of transferring data from the kernel to user space and then