Re: [PATCH] new flag COPY_FILE_RANGE_FILESIZE for copy_file_range()

2019-04-14 Thread Amir Goldstein
On Sun, Apr 14, 2019 at 4:04 AM Darrick J. Wong wrote: > > On Sat, Apr 13, 2019 at 03:54:39PM -0500, Shawn Landden wrote: > > /me pulls out his close-reading glasses and the copy_file_range manpage... > > > If flags includes COPY_FILE_RANGE_FILESIZE then the length > > copied is the length of the

Re: [PATCH] new flag COPY_FILE_RANGE_FILESIZE for copy_file_range()

2019-04-13 Thread Darrick J. Wong
On Sat, Apr 13, 2019 at 03:54:39PM -0500, Shawn Landden wrote: /me pulls out his close-reading glasses and the copy_file_range manpage... > If flags includes COPY_FILE_RANGE_FILESIZE then the length > copied is the length of the file. off_in and off_out are > ignored. len must be 0 or the file

Re: [PATCH] new flag COPY_FILE_RANGE_FILESIZE for copy_file_range()

2019-04-13 Thread Andy Lutomirski
> On Apr 13, 2019, at 1:49 PM, Shawn Landden wrote: > > If flags includes COPY_FILE_RANGE_FILESIZE then the length > copied is the length of the file. off_in and off_out are > ignored. len must be 0 or the file size. > > This implementation saves a call to stat() in the common case > of

[PATCH] new flag COPY_FILE_RANGE_FILESIZE for copy_file_range()

2019-04-13 Thread Shawn Landden
If flags includes COPY_FILE_RANGE_FILESIZE then the length copied is the length of the file. off_in and off_out are ignored. len must be 0 or the file size. This implementation saves a call to stat() in the common case of copying files. It does not fix any race conditions, but that is possible in

[PATCH] new flag COPY_FILE_RANGE_FILESIZE for copy_file_range()

2019-04-13 Thread Shawn Landden
If flags includes COPY_FILE_RANGE_FILESIZE then the length copied is the length of the file. off_in and off_out are ignored. len must be 0 or the file size. This implementation saves a call to stat() in the common case of copying files. It does not fix any race conditions, but that is possible in