Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Server-side copy

Windows Explorer, cp on a Linux CIFS mount, and macOS Finder ask the server to copy file data directly.

RequestBehavior
COPYCHUNK, COPYCHUNK_WRITECopies byte ranges within a share or between two shares in the same session
FSCTL_DUPLICATE_EXTENTS_TO_FILEClones a byte range on a backend that shares blocks between files
Apple whole-file copyCopies a file with its last write time, its creation time (except on Linux), and its named streams when both shares support them. Advertised on shares with named streams
CallDisables
.server_side_copy(false) on ShareAll server-side copy on that share; clients copy data themselves
apple_copyfile(false) on the builderApple whole-file copy only

LocalFsBackend

HostCopyCloning
Linuxcopy_file_range(2): shares blocks where the filesystem supports it, copies in the kernel otherwise, and falls back to reads and writes. Named streams always use reads and writesBtrfs and XFS with reflinks: supports FSCTL_DUPLICATE_EXTENTS_TO_FILE and reports FILE_SUPPORTS_BLOCK_REFCOUNTING
WindowsReads and writesVolumes that report block cloning, such as ReFS
macOSReads and writesNone

Block cloning is unavailable on a .read_only() backend, or when the server cannot create files in the share root.