[PATCH] Fix bug 9412 - SMB2 server doesn't support recvfile.

Jeremy Allison jra at samba.org
Wed Apr 16 15:34:10 MDT 2014


On Wed, Apr 16, 2014 at 12:28:23PM -0700, Jeremy Allison wrote:
> 
> OK, I looked really closely at the kernel
> source code (3.2.x - just what I had handy :-).
> 
> Once the input socket is set to blocking
> mode, then the only way splice() can
> return EAGAIN is if the flag SPLICE_F_NONBLOCK
> is passed into splice - which we don't
> do.
> 
> So I can't currently see any way that
> splice can return EAGAIN once the
> input socket is set to blocking mode.
> 
> Are you using a custom splice() call ?
> 
> If not, what kernel are you using so
> I can look at exactly the source code
> you have ?

I've done some testing transferring a
3GB file using smbclient to a recvfile+splice
using server, and I can't get it to
hit the EAGAIN case.

Can you give me more details as to
how you're reproducing this problem ?

I'm still of the opinion so far my
patch is good w.r.t. fixing splice()
to handle non-blocking sockets, but
I need to know exactly how you're
reproducing first.

Cheers,

	Jeremy.


More information about the samba-technical mailing list