[PATCH] Fix RECVFILE with non-blocking sockets and add OEM recvfile call.
Stefan (metze) Metzmacher
metze at samba.org
Thu May 22 06:59:09 MDT 2014
Hi Jeremy,
>>> Here are two patches to fix non-blocking RECVFILE
>>> for OEMs who use a modified kernel
>>> that allows splice to move data directly
>>> from socket to file instead of going
>>> via a pipe.
>>>
>>> The first patch is the one that Jones
>>> tested to ensure that the default
>>> implementation of sys_recvfile
>>> copes correctly with a non-blocking
>>> socket. This one just needs second
>>> team review.
>>>
>>> The second one is the patch that
>>> NetGear uses in their boxes in
>>> conjunction with their custom
>>> kernel splice code that allows
>>> direct recvfile from socket fd
>>> to file fd. This was was Signed-off-by
>>> Justin Maggard <jmaggard at netgear.com>
>>> (Justin has sent in the GPL assignment
>>> form) and reviewed by me and just needs
>>> a second Team reviewer. They want
>>> to push it upstream to prevent them
>>> from having to maintain it as an
>>> out-of-tree patch.
>>>
>>> It doesn't compile by default, but
>>> needs:
>>>
>>> #define HAVE_LINUX_SPLICE_FROM_SOCKET
>>>
>>> set inside local.h.
>>>
>>> Please review and push if you're
>>> happy !
>>
>> Ping ! I meant to raise this and get
>> it reviewed @ SambaXP, but didn't
>> get time :-).
>>
>> Can I get a review on these two please
>> (it's been pending since May 8th, so
>> I think I'm entitled to push :-).
>
> I hope to get some time to test this in the next days.
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.
metze
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20140522/0de6153d/attachment.pgp>
More information about the samba-technical
mailing list