diff options
author | Steve French <stfrench@microsoft.com> | 2019-03-06 06:04:56 +0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2019-03-06 06:11:54 +0300 |
commit | 69dc4b181710d0a7c1a2780a56c715703cd1fb06 (patch) | |
tree | 2e3d9566bdb05d711bed492bca71bec1b14a9a54 /fs/cifs/smb2pdu.c | |
parent | b30c74c73c787d853ecb9fcf5c59511a09a4ec59 (diff) | |
download | linux-69dc4b181710d0a7c1a2780a56c715703cd1fb06.tar.xz |
smb3: request more credits on normal (non-large read/write) ops
We can end up building up credits too slowly to do large operations
(reads and writes for example) that require many credits. By
comparison most other SMB3 clients request many more (sometimes
thousands) of credits on all operations. Increase
the number of credits we request on typical (non-large e.g
read/write) operations to 10 from 2 so we can build a pool of credits
faster.
Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Diffstat (limited to 'fs/cifs/smb2pdu.c')
-rw-r--r-- | fs/cifs/smb2pdu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c index 733021566356..60fbe306f604 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c @@ -107,13 +107,13 @@ smb2_hdr_assemble(struct smb2_sync_hdr *shdr, __le16 smb2_cmd, struct TCP_Server_Info *server = tcon->ses->server; spin_lock(&server->req_lock); - /* Request up to 2 credits but don't go over the limit. */ + /* Request up to 10 credits but don't go over the limit. */ if (server->credits >= server->max_credits) shdr->CreditRequest = cpu_to_le16(0); else shdr->CreditRequest = cpu_to_le16( min_t(int, server->max_credits - - server->credits, 2)); + server->credits, 10)); spin_unlock(&server->req_lock); } else { shdr->CreditRequest = cpu_to_le16(2); |