SMB2.2 Negotiation and typical operations work to Windows 8 from Pavel's current patch set

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Forgot to include subject line

Functional testing went pretty well this week.  I did get a test
failure on one of the connectathon lock tests and one of the "special"
tests, and I didn't turn on cifsacl support, but nothing critical.


---------- Forwarded message ----------
From: Steve French <smfrench@xxxxxxxxx>
Date: Thu, Mar 1, 2012 at 7:03 PM
Subject:
To: Shirish Pargaonkar <shirishpargaonkar@xxxxxxxxx>, Pavel Shilovsky
<piastryyy@xxxxxxxxx>, linux-cifs@xxxxxxxxxxxxxxx


Turns out it is easy to negotiate SMB2.2 against Windows 8 (rather
than just 2.1 or 2.0 as Pavel's current git tree does).  Basic
operations worked fine.  SMB2.2 is a very cool protocol, but since
most features are optional, upgrading to SMB2.2 is not bad.  For
example this change to Pavel's git tree is trivial:

diff -U 4 fs/smb2/smb2pdu.c fs/cifs/smb2pdu.c
--- fs/smb2/smb2pdu.c   2012-03-01 18:30:24.986486510 -0600
+++ fs/cifs/smb2pdu.c   2012-03-01 18:33:35.066765305 -0600
@@ -357,20 +357,22 @@
       else if (resp_buftype == CIFS_LARGE_BUFFER)
               cifs_buf_release(pSMB2r);
 }

-#define SMB2_NUM_PROT 2
+#define SMB2_NUM_PROT 3

 #define SMB2_PROT   0
 #define SMB21_PROT  1
+#define SMB22_PROT  2
 #define BAD_PROT 0xFFFF

 static struct {
       int index;
       __le16 name;
 } smb2protocols[] = {
       {SMB2_PROT,  cpu_to_le16(SMB2_PROT_ID)},
       {SMB21_PROT, cpu_to_le16(SMB21_PROT_ID)},
+       {SMB22_PROT, cpu_to_le16(SMB22_PROT_ID)},
       {BAD_PROT,   cpu_to_le16(BAD_PROT_ID)}
 };

 /*
@@ -464,9 +466,11 @@
       }

       cFYI(1, "mode 0x%x", pSMB2r->SecurityMode);

-       if (pSMB2r->DialectRevision == smb2protocols[SMB21_PROT].name)
+       if (pSMB2r->DialectRevision == smb2protocols[SMB22_PROT].name)
+               cFYI(1, "negotiated smb2.2 dialect");
+       else if (pSMB2r->DialectRevision == smb2protocols[SMB21_PROT].name)
               cFYI(1, "negotiated smb2.1 dialect");
       else if (pSMB2r->DialectRevision == smb2protocols[SMB2_PROT].name)
               cFYI(1, "negotiated smb2 dialect");
       else {
diff -U 4 fs/smb2/smb2pdu.h fs/cifs/smb2pdu.h
--- fs/smb2/smb2pdu.h   2012-03-01 18:30:24.986486510 -0600
+++ fs/cifs/smb2pdu.h   2012-03-01 18:32:11.896643315 -0600
@@ -38,8 +38,10 @@
 */

 #define SMB2_PROT_ID  0x0202
 #define SMB21_PROT_ID 0x0210
+#define SMB22_PROT_ID 0x0224
+
 #define BAD_PROT_ID   0xFFFF

 /* List is sent on wire as little endian */
 #define SMB2_NEGOTIATE         cpu_to_le16(0x0000)

--
Thanks,

Steve


-- 
Thanks,

Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux