rpcs3
rpcs3 copied to clipboard
fs/linux: fix potential copy_file issue
sendfile/sendfile64 is meant to be run in a loop, since there is no guarantee that a single call copies all the data. The current implementation may lead to corrupt files on linux.
~~maybe sendfile indeed needs a loop but sendfile64 does not? I don't find any information the limitation of sendfile64.~~
Maybe there is no need to use sendfile64, actually, it seems Linux-specific
you mean because of this? "The glibc sendfile() wrapper function transparently deals with the kernel differences."
I think so, yes