Disable the use of splice(2)
authorVolker Lendecke <vl@samba.org>
Thu, 25 Dec 2008 12:44:11 +0000 (13:44 +0100)
committerVolker Lendecke <vl@samba.org>
Wed, 31 Dec 2008 18:33:25 +0000 (19:33 +0100)
On a debian lenny installation with a kernel that calls itself 2.6.28, I could
repeatably block smbd using splice. According to the output of netstat, the
recvq of the TCP connection was full and at the same time according to strace
smbd was stuck in a splice syscall trying to read from that TCP connection. We
can not protect ourselves from this condition, as nobody will ever notify us
that something is broken. So sadly we can't use splice yet at all. Maybe in
2.6.29...

source3/lib/recvfile.c

index 41f72139437637e3b95fdf18c8aaea6b0057e276..c9710a7ebee9fc8f82d4878d7496545d3980c854 100644 (file)
@@ -146,7 +146,7 @@ ssize_t sys_recvfile(int fromfd,
                        size_t count)
 {
        static int pipefd[2] = { -1, -1 };
-       static bool try_splice_call = true;
+       static bool try_splice_call = false;
        size_t total_written = 0;
 
        DEBUG(10,("sys_recvfile: from = %d, to = %d, "