CIFS: Use multicredits for SMB 2.1/3 writes
authorPavel Shilovsky <pshilovsky@samba.org>
Thu, 5 Jun 2014 15:03:27 +0000 (19:03 +0400)
committerSteve French <smfrench@gmail.com>
Sat, 2 Aug 2014 06:23:03 +0000 (01:23 -0500)
commitcb7e9eabb2b584884db0d11ae0376d31ac1cfdc1
tree4f6fd78f74b173359dd673b8bf49b8f188aab0be
parent6ec0b01b2691d1465bb7219e031e8bf38ccd9397
CIFS: Use multicredits for SMB 2.1/3 writes

If we negotiate SMB 2.1 and higher version of the protocol and
a server supports large write buffer size, we need to consume 1
credit per 65536 bytes. So, we need to know how many credits
we have and obtain the required number of them before constructing
a writedata structure in writepages and iovec write.

Reviewed-by: Shirish Pargaonkar <spargaonkar@suse.com>
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org>
Signed-off-by: Steve French <smfrench@gmail.com>
fs/cifs/cifsglob.h
fs/cifs/cifsproto.h
fs/cifs/file.c
fs/cifs/smb1ops.c
fs/cifs/smb2ops.c
fs/cifs/smb2pdu.c
fs/cifs/smb2transport.c
fs/cifs/transport.c