Hello, Linux 3.16 (3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt4-1, glibc 2.19-18) seems to truncate larger requests to 2G (file to file copy): strace output: sendfile(4, 3, [0], 10240000000) = 2147479552 I know one should expect this behavior from read/write calls but for sendfile it was somehow unexpected. Maybe you could mention that fact in the man page for sendfile? Thanks, Gregor
I added some text to cover this: RETURN VALUE If the transfer was successful, the number of bytes writ‐ ten to out_fd is returned. Note that a successful call to sendfile() may write fewer bytes than requested; the caller should be prepared to retry the call if there were unsent bytes. Hopefully that suffices? Thanks, Michael