More recvfile optimizations
jra at samba.org
Thu Apr 10 19:42:40 MDT 2014
On Fri, Apr 11, 2014 at 01:48:27AM +0200, Stefan (metze) Metzmacher wrote:
> Am 10.04.2014 23:58, schrieb Stefan (metze) Metzmacher:
> > Am 10.04.2014 23:24, schrieb Jeremy Allison:
> >> On Thu, Apr 10, 2014 at 11:05:14PM +0200, Stefan (metze) Metzmacher wrote:
> >>> I don't have a fix.
> >>> But we would need such check in is_smb2_recvfile_write(), correct?
> >> Well, there are two ways of doing it.
> >> First one is to add the :
> >> smbd_smb2_request_check_session()
> >> smbd_smb2_request_check_tcon()
> >> calls into is_smb2_recvfile_write(), which is
> >> the same way the SMB1 code does it.
> > I'd just do a smb2srv_open_lookup() to get fsp
> > (similar to file_fsp_get()), and use fsp->conn.
> > In future I'd let is_valid_writeX_buffer()
> > use smb1srv_open_lookup() instead of smb1srv_tcon_lookup().
> Ok, here's my first set which doesn't add fsp->supports_recvfile yet.
Ah, you got there first - my fault for spending time
with the family I guess :-). At first glance, looks
great ! I'll do a full review tomorrow.
We'll probably want a bug to add these back-ports
to 4.1.x (probably not 4.0.x) to allow SMB2 recvfile
to work correctly there too.
More information about the samba-technical