On linux, we have the call
int ioctl(int, FICLONERANGE, struct file_clone_range *);
to "reflink" files. APFS also supports COW and thus a similar system call should exist. However, the clonefile
API can only clone whole files, not blocks within the file.
Is there something similar to the ioctl call?