Skip to content

SystemNative_CopyFile() should use copy_file_range() in Linux #30156

@lpereira

Description

@lpereira

copy_file_range() is a relatively new syscall in Linux (4.5+, with a userspace emulation in glibc since 2.27) that copies data between file descriptors without passing them through userland. The kernel tries different methods depending on the filesystem (for instance, NFS supports a "cloning" operation that won't require data to go back and forth through the network, and that's tried first), ultimately performing a copy using splice().

On systems where this is supported, this should be used to implement file copying.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions