pub(super) fn copy_regular_files(
    reader: RawFd,
    writer: RawFd,
    max_len: u64
) -> CopyResult
Expand description

Linux-specific implementation that will attempt to use copy_file_range for copy offloading. As the name says, it only works on regular files.

Callers must handle fallback to a generic copy loop. Fallback may indicate non-zero number of bytes already written if one of the files’ cursor +max_len would exceed u64::MAX (EOVERFLOW).