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

Stefan (metze) Metzmacher metze at samba.org
Wed Aug 14 13:34:31 MDT 2013


Hi Jeremy,

>> Especially as with your new code reading files
>> is now broken :-(. Example with my test file of
>> 3695179776 byes against Windows Server 2012:
>>
>> bin/smbclient //172.27.69.20/temp -mSMB3  --send-buffer=0
>> Domain=[WIN-4QBFHKK7F2P] OS=[] Server=[]
>> smb: \> get en_windows_server_2012_x64_dvd_915478.iso 
>> parallel_read returned NT_STATUS_CONNECTION_DISCONNECTED
>>
>> Which didn't happen with the earlier change (without
>> the re-written cli_pull()/push()).
>>
>> Yes I know this is just a bug with the new cli_pull/push
>> code (which we'll have to track down and fix) but
>> wouldn't it be easier to have working SMB2 read/write,
>> then debug the changed cli_pull/push code afterwards ?

The problem is that I think it just works because it doesn't max out
the credits, but would fail against a busy server, which slows
us down.

Also adding smb2cli_conn_available_credits() and the related
cli_read_max_bufsize() change and directly reverting them in the same
patchset seems a bit strange.

> I'm pretty sure this is us running out of credits.
> Usually that's what causes the server to send a
> FIN back.

Yes, it was a generic credit problem which had nothing to do with my
changes.

See
https://gitweb.samba.org/?p=metze/samba/wip.git;a=commitdiff;h=080f8bcb2b91ae1f09d06ba219567a7f6f1a1605

I've also fixed a problem with short read and getting END_OF_FILE which
was found by autobuild
and the OPLOCK2 torture test.

I've tested the current patchset with LANMAN2, NT1, SMB2_02, SMB2_10 and
SMB3 against
a w2012 server with the en_windows_server_2012_x64_dvd_915478.iso file.
(I'm getting an error in the LANMAN1 tree_connect_andx request, using an
old tree_connect
 works there too, but I'll leave the fix for that for another day...)
I've tested it with the defeault window size (16MByte) and with
512MByte, but there
doesn't seem to be a win with a larger size.

Everything seems to work fine and it passed autobuild 3 times...

Please go through the commits and re-add your sign-off to commits I've
modified
and the review to the others, if you're also happy with it.

I've tested the cli_writeall() with the LARGE_WRITEX smbtorture3 test
and -mSMB3.

I've a few more patches in my master3-jra branch which allow debugging
of credits
and the cli_pull/push code. This hacks are great to see when we're
waiting for more credits
and how many requests(chunks) are pending.

I've also added progress handling to 'get' and 'put' of smbclient,
but that needs more work for upstream, but it's nice to see something
happening while
copying a 3 GB file.

From a w2012 vm 'get' into the local memdisk gives about 200 MBytes/s
with SMB2_02
and 350 MBytes/s with SMB2_10 and multi-credit support and my laptop...

metze
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tmp.diff.gz
Type: application/x-gzip
Size: 34237 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20130814/bdf8af71/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/20130814/bdf8af71/attachment.pgp>


More information about the samba-technical mailing list