[SMB3][PATCH] fix copy_file_range when copying beyond end of source file

Dave Chinner david at fromorbit.com
Thu Jun 20 04:52:11 UTC 2019


On Wed, Jun 19, 2019 at 10:19:30PM -0500, Steve French wrote:
> Local file systems that I tried, seem to agree with xfstest and return
> 0 if you try to copy beyond end of src file but do create a zero
> length target file

The zero length target file that remains after cfr returns zero
because src > EOF was not created by cfr.  i.e. the destination file
has to be created by the application before cfr is called. Hence
what you see here is the result of running cfr to an existing zero
length file and copying zero bytes to it....

Cheers,

Dave.
-- 
Dave Chinner
david at fromorbit.com



More information about the samba-technical mailing list