More recvfile optimizations
Jeremy Allison
jra at samba.org
Thu Apr 10 16:04:34 MDT 2014
On Thu, Apr 10, 2014 at 11:58:09PM +0200, Stefan (metze) Metzmacher wrote:
> 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.
Yeah, that's probably quicker.
I'll update my patch with that tomorrow (or
you can do it if you feel so inclined :-).
Jeremy.
> Then we can add a bool support_recvfile to fsp.
> We should not add this for directories or fake files.
> SMB_VFS_OPEN should decide if recvfile is supported.
>
> And maybe also add bool support_sendfile.
>
> This way we would integrate something like this:
>
> http://opensource.apple.com/source/samba/samba-235.7/patches/add-sendfile-capability-bit-to-fsp
Yeah, looks a good idea !
Jeremy.
More information about the samba-technical
mailing list