Server-side copy with sendfile system call

Teng-Feng Yang shinrairis at gmail.com
Mon May 12 02:18:11 MDT 2014


Hi,

I recently noticed that samba now supports server-side copy feature.
For BTRFS, the btrfs VFS module will override the copy_chunk_send/recv
to utilize the copy_range ioctl to improve the copy performance
further. For other filesystem such as ext4, it will fallback to
default copy_chunk behavior which pread the file data and pwrite them
to the copy destination.

This makes me wonder if we can replace the read-then-write procedure
with sendfile system call which claims to outperform the file copy in
userspace.

Any comment would be appreciated.
Thanks.

Dennis


More information about the samba-technical mailing list