[PATCH] Fix RECVFILE with non-blocking sockets and add OEM recvfile call.

Jeremy Allison jra at samba.org
Thu May 22 14:56:12 MDT 2014


On Thu, May 22, 2014 at 02:59:09PM +0200, Stefan (metze) Metzmacher wrote:
> 
> I'm getting EINVAL from splice if I use large io sizes, when using SMB3.
> When count is truncated to TRANSFER_BUF_SIZE (128*1024) it works fine.
> 
> We should also make sure we don't get nwritten == 0 from splice,
> as that would mean we're in an endless loop.

OK, looking at these patches closely, can you +1
and add your 'Reviewed-by:' to the first of the
two patches - that's the one that only fixes
the non-splice recvfile (the read/write path
in TRANSFER_BUF_SIZE (128*1024) chunks)
to work correctly with a non-blocking
socket.

That single fix (attached) is independent
of the splice() code changes, and can
be pushed independently. It would be good
to get this in, as it allows people to
turn on recvfile in SMB2 without needing
a working splice and I'll work on the splice
version later.

Thanks !

Jeremy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-s3-smbd-default_sys_recvfile-and-spice-recvfile-were.patch
Type: text/x-diff
Size: 2514 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20140522/f67afcca/attachment.patch>


More information about the samba-technical mailing list