[PATCH 5/5] vfs_default: add copy_file_range support for copy chunk

Björn Jacke bjacke at samba.org
Sat Jan 28 10:39:31 UTC 2017


On 2017-01-22 at 14:09 +0100 David Disseldorp sent off:
> That sounds like a horribly broken API. Do you have a standalone test
> for this? Looking at the kernel VFS implementation[1], that doesn't
> appear to be the case - what does happen to the off_in/off_out args is
> that on success they're incremented by the amount copied, so maybe your
> previous implementation was incorrectly updating the offsets twice, i.e.
> once in kernel and again in your copy loop?

I misunderstood how it was meant to work. Got it now and I got rid of the
lseeks.

See attached patch which also leaves the manual rw loop logic alone now.

Björn
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-vfs_default-add-copy_file_range-support-for-copy-chu.patch
Type: text/x-diff
Size: 4616 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170128/2f247555/0001-vfs_default-add-copy_file_range-support-for-copy-chu.diff>


More information about the samba-technical mailing list