]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
smb3: increase initial number of credits requested to allow write
authorSteve French <stfrench@microsoft.com>
Wed, 13 Jun 2018 22:05:58 +0000 (17:05 -0500)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:43:57 +0000 (19:43 -0600)
BugLink: https://bugs.launchpad.net/bugs/1835845
[ Upstream commit d409014e4feeab486fb36b350abfc4c94de8be37 ]

Compared to other clients the Linux smb3 client ramps up
credits very slowly, taking more than 128 operations before a
maximum size write could be sent (since the number of credits
requested is only 2 per small operation, causing the credit
limit to grow very slowly).

This lack of credits initially would impact large i/o performance,
when large i/o is tried early before enough credits are built up.

Signed-off-by: Steve French <sfrench@gmail.com>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
fs/cifs/smb2pdu.c

index 83f63ec6eaa388ac9693fd0e15a4491b35f37428..330b8b34204ea71c3c3da9091878abb0b930541a 100644 (file)
@@ -830,8 +830,9 @@ SMB2_sess_alloc_buffer(struct SMB2_sess_data *sess_data)
        req->PreviousSessionId = sess_data->previous_session;
 
        req->Flags = 0; /* MBZ */
-       /* to enable echos and oplocks */
-       req->hdr.sync_hdr.CreditRequest = cpu_to_le16(3);
+
+       /* enough to enable echos and oplocks and one max size write */
+       req->hdr.sync_hdr.CreditRequest = cpu_to_le16(130);
 
        /* only one of SMB2 signing flags may be set in SMB2 request */
        if (server->sign)