I understand that classically, the Linux Kernel was conservative about adding new syscalls.
But, I've learned about the existence of copy_file_range, which seems to do the exact same thing as sendfile. The only differences I could spot are:
- doesn't work on sockets at all, only on proper regular files
- allows for both input and output offset to be set
But for regular files, a seek might achieve the same offset semantics, so now I'm confused what the purpose of the copy_file_range syscall is, if its abilities are a strict subset of San existing syscall? Especially since seeking as a separate thing can be done quite sensibly separately, so to not extend the time spent in kernelspace even further l. (As a usual is OS design goal is to make operating system calls not block, and physical seeking can be finished while control is already handed back to userland.)