More recvfile optimizations

Jeremy Allison jra at samba.org
Tue Apr 15 12:17:43 MDT 2014


On Mon, Apr 14, 2014 at 08:38:54PM +0800, Jones wrote:
> 2014-04-10 19:48 GMT+08:00 Stefan (metze) Metzmacher <metze at samba.org>:
>      The big TODO is an existing bug that we don't really check if the
>      file
>      handle
>      supports recvfile, a named pipe doesn't support this and a print file
>      may also doesn't support
>      it. 
> 
> Hi Metze,
> 
> Well that's good!
> im probably suffered the same issues these days.
> 
> While cooperating cups and samba with RECVFILE enabled,
> if go through SMB1 everything works fine,
> if go through SMB2/3 sometimes failed.
> 
> And log.smbd said:
> [2013/12/10 17:23:53.242016,  0] ../source3/rpc_server/srv_pipe_hnd.c:89
> (get_pdu_size)
>   Unexpected RPC Fragment size! (53439)
> ...
> [2014/03/29 18:51:12.354896,  0] ../source3/rpc_server/srv_pipe_hnd.c:89
> (get_pdu_size)
>   Unexpected RPC Fragment size! (0)
> ...
> 
> Wireshark shows SMB2 write command would return NT_STATUS:
> STATUS_UNEXPECTED_IO_ERROR.
> 
> To way around the write with print type and ipc type i add ugly code 
> into is_smb2_recvfile_write(), but looks this patch is better one,
> i would try to test again and report status later,
> thanks.

Yes, that got fixed in master with Metze's patchset.

Please re-test on master, and the problem should
be gone. I'm planning to raise a bug to back-port
this fix to 4.1.x.

Jeremy.


More information about the samba-technical mailing list