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

Björn JACKE bj at SerNet.DE
Mon Feb 13 15:36:47 UTC 2017


On 2017-02-08 at 11:57 +0100 David Disseldorp sent off:
> IMO it's still worth splitting for the reasons mentioned earlier:
>   + this would avoid the 8M I/O buffer allocation in the fast-path.

have a look at the latest patch, this allocation isn't done in the fast path any
more.

>   + mid-function #ifdef pollution would be avoided.

the latests patch is visibly and logically separated from the manual copy code
and the "fallback" path. I would like to keep it as it is in this patch here as
I think the separation is clean and the overhead is minimized.

>   + I/O sizes could be tuned independently of the read/write loop.

the I/O size is not an issue for the fast path as this is a one-shot call
there. There is no need for a maximum read/write chunk with copy_file_range.

Cheers
Björn



More information about the samba-technical mailing list