[PATCH] Fix bug 9412 - SMB2 server doesn't support recvfile.
jra at samba.org
Tue Apr 15 13:46:28 MDT 2014
On Tue, Apr 15, 2014 at 10:14:28AM -0700, Jeremy Allison wrote:
> On Tue, Apr 15, 2014 at 09:48:45AM -0700, Jeremy Allison wrote:
> > On Mon, Apr 14, 2014 at 08:05:00PM +0800, Jones wrote:
> > > 2014-04-14 19:39 GMT+08:00 Jones <jones.kstw at gmail.com>:
> > >
> > > If the splice returned -1 with errno = Â EAGAIN occurred twice
> > > successively,
> > > the file transferring progress would be terminated,
> > >
> > >
> > > Hello Jeremy, Metze,
> > >
> > > Forgot to ask a question about this test result.
> > > Question: is this result as the patch expected?
> > > Thanks for your time.
> > Hmmm. No, don't think that should happen,
> > let me look closely at the splice code.
> OK, I see the bug. It doesn't handle
> EAGAIN correctly in the splice loop
> (in my defence, that's not listed
> as a possible error return in the
> man page, and when I wrote the
> original code the socket was
> always blocking :-). Needs a fix,
> I'll post one shortly for you
> to test...
OK - Jones, can you test the following
patch in your setup ?
It should fix both the default_sys_recvfile()
case and the splice recvfile case to cope
with the underlying read mechanism
returning -1, EAGAIN||EWOULDBLOCK on
a blocking socket.
As I mention above, the original
default_sys_recvfile() and splice()
code wasn't written with a non-blocking
socket in mind, so needed some adjustment.
Hopefully this is the last of it !
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2514 bytes
Desc: not available
More information about the samba-technical