]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: fix wsize negotiation to respect max buffer size and active signing (try #4)
authorJeff Layton <jlayton@redhat.com>
Wed, 22 Jun 2011 21:33:57 +0000 (17:33 -0400)
committerSteve French <sfrench@us.ibm.com>
Thu, 23 Jun 2011 17:54:39 +0000 (17:54 +0000)
commitc1e3cb91373755e4348c55489346fb786df6eae5
tree7a754b292e2cac6f5fe808d3e66c90c9689593e9
parent37c23d930f86761740c2cec953cf38b741031fcb
cifs: fix wsize negotiation to respect max buffer size and active signing (try #4)

Hopefully last version. Base signing check on CAP_UNIX instead of
tcon->unix_ext, also clean up the comments a bit more.

According to Hongwei Sun's blog posting here:

    http://blogs.msdn.com/b/openspecification/archive/2009/04/10/smb-maximum-transmit-buffer-size-and-performance-tuning.aspx

CAP_LARGE_WRITEX is ignored when signing is active. Also, the maximum
size for a write without CAP_LARGE_WRITEX should be the maxBuf that
the server sent in the NEGOTIATE request.

Fix the wsize negotiation to take this into account. While we're at it,
alter the other wsize definitions to use sizeof(WRITE_REQ) to allow for
slightly larger amounts of data to potentially be written per request.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/connect.c