diff options
author | Pavel Shilovsky <pshilovsky@samba.org> | 2014-06-05 11:03:27 -0400 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2014-08-02 02:23:03 -0400 |
commit | cb7e9eabb2b584884db0d11ae0376d31ac1cfdc1 (patch) | |
tree | 4f6fd78f74b173359dd673b8bf49b8f188aab0be /fs/cifs/cifsproto.h | |
parent | 6ec0b01b2691d1465bb7219e031e8bf38ccd9397 (diff) |
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>
Diffstat (limited to 'fs/cifs/cifsproto.h')
-rw-r--r-- | fs/cifs/cifsproto.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h index de49d7a37b00..c31ce98c1704 100644 --- a/fs/cifs/cifsproto.h +++ b/fs/cifs/cifsproto.h | |||
@@ -90,6 +90,9 @@ extern struct mid_q_entry *cifs_setup_async_request(struct TCP_Server_Info *, | |||
90 | struct smb_rqst *); | 90 | struct smb_rqst *); |
91 | extern int cifs_check_receive(struct mid_q_entry *mid, | 91 | extern int cifs_check_receive(struct mid_q_entry *mid, |
92 | struct TCP_Server_Info *server, bool log_error); | 92 | struct TCP_Server_Info *server, bool log_error); |
93 | extern int cifs_wait_mtu_credits(struct TCP_Server_Info *server, | ||
94 | unsigned int size, unsigned int *num, | ||
95 | unsigned int *credits); | ||
93 | extern int SendReceive2(const unsigned int /* xid */ , struct cifs_ses *, | 96 | extern int SendReceive2(const unsigned int /* xid */ , struct cifs_ses *, |
94 | struct kvec *, int /* nvec to send */, | 97 | struct kvec *, int /* nvec to send */, |
95 | int * /* type of buf returned */ , const int flags); | 98 | int * /* type of buf returned */ , const int flags); |