[PATCH} Implement SMB3/SMB3 in smbclient and smbcacls (and generic client library).

Stefan (metze) Metzmacher metze at samba.org
Tue Aug 13 11:27:43 MDT 2013


Am 13.08.2013 18:55, schrieb Stefan (metze) Metzmacher:
> Hi Jeremy,
> 
>>> here're some updates to your patches.
>>>
>>> - I replaced interpret_protocol() by
>>>   lp_set_cmdline("client max protocol", poptGetOptArg(pc));
>>>   and lp_cli_max_protocol()
>>>
>>> - I renamed the new function to cli_smb2_ as prefix
>>>   instead of smb2cli_ (this should be used only by the generic toplevel
>>>   functions).
>>>
>>> - I used DEFAULT_SMB2_MAX_CREDITS instead of lp_smb2_max_credits() which
>>> is for the server.
>>>
>>> Then I added some TODOs into commit messages.
>>>
>>> -  TODO: Fix smb2cli_req_create() to set the credit charge correctly on
>>> large-MTU read requests.
>>>
>>>    If we don't do this right, W2K12 returns INVALID_PARAMETER on SMB2_READ.
>>>
>>>    Signed-off-by: Jeremy Allison <jra at samba.org>
>>>
>>>    TODO: let the callers use smb2cli_req_set_credit_charge()
>>>    needed for read, query_info, query_directory, ioctl and maybe create
>>>
>>>    e.g. smb2cli_read_send() should use smb2cli_req_create() followed
>>>    by smb2cli_req_set_credit_charge() and smb2cli_req_set_credit_charge()
>>>    instead of smb2cli_req_send().
>>>
>>>   (We can also fix this cleanly later...)
>>>
>>> - TODO: Fix cli_read_max_bufsize() to cope with available credits in the
>>> large MTU case.
>>>
>>>   Signed-off-by: Jeremy Allison <jra at samba.org>
>>>
>>>   TODO: this is needed for also for write
>>>   and maybe for others too, query_directory, query_info
>>>
>>>   TODO: this needs to be dynamic as cli_pull() can't use fixed
>>>   numbers of outstanging requests nor fixed chunk sizes.
>>>
>>>   Servers can try to slow down a client and then we would get errors...
>>
>> Ok, I'm happy with these changes. I fixed up the patch
>> for the minor compile issues and have sent it back for
>> your review.
>>
>> Let me know when you're happy and feel free to push,
>> or I'll push.
> 
> Here's my current patchset (from my master3-jra branch)
> 
> I've rewritten cli_pull/push to dynamically use up to 256 requests.
> The complete set compiles for me, but I haven't done any testing yet.
> (I'm compile each commit later...)
> 
> I've marked the commits I've done completely new as "TODO testing ..."
> and some should be reviewed again by you and one maybe squashed after
> your review.

I've tested put and get with a 35M file

There was a next = chunk; instead of next = chunk->next; ...

metze
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tmp.diff.gz
Type: application/x-gzip
Size: 33498 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20130813/be06b2d7/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20130813/be06b2d7/attachment.pgp>


More information about the samba-technical mailing list