From patchwork Wed Jan 23 21:10:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Shilovsky X-Patchwork-Id: 10777901 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7AC881515 for ; Wed, 23 Jan 2019 21:11:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 69FB72D7AB for ; Wed, 23 Jan 2019 21:11:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5E5842D7B2; Wed, 23 Jan 2019 21:11:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 176D02D7AB for ; Wed, 23 Jan 2019 21:11:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726992AbfAWVLH (ORCPT ); Wed, 23 Jan 2019 16:11:07 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:43941 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726345AbfAWVLH (ORCPT ); Wed, 23 Jan 2019 16:11:07 -0500 Received: by mail-pf1-f194.google.com with SMTP id w73so1789402pfk.10 for ; Wed, 23 Jan 2019 13:11:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=cOHeMwAB/ZY1Ttyh/93tA4n56exxeMOFq4aw1IzvY6I=; b=IX+pOApIC1DGZdmPIQwxFg5Er823JvKt1LxjCDKFzKad0ZpXo1OPlbYZmKtECKqhyj opkP6oVFvI606qbU9iCxM9LpiGHnx+eKq1fGxUv8z/5z5EDD6AW9quzLnAn7reFov2Az JDfdUz117KAQlkcD2/csBNVcrwxx5Wpr0tW3oZZ4hMpeRihB8MK4ptM4pVTjCGyznv+I epYTscs2FM74NlgEX4TOMt78nzBYvHCzrtsEn+gg4HAjiLH8K9C6zydCi1pg7mSyVZhZ EX8iWWSLI74ZLhxddKsjUYdVcoI+E6/Wf5EhTz50rGQpRDAuH+B5ILi92tpNf0T3EiHP tTsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=cOHeMwAB/ZY1Ttyh/93tA4n56exxeMOFq4aw1IzvY6I=; b=GvJQV0MLTzaWwZO9+SEOzJQAg8xm3yPNIk1y0NJ1aU+uOJReHlmwxSvp+CnuWLGKFg 2LMTIORPuvUM8s+9ilRCxkuZI0AKKBg9mbTfV3IPgrg0srBhdMWyM6+JEMbd212Q45F5 RqdnE7BMc0FhyE8hu6NUh3mro+CCdvwDM5yLrXL/y+sSP3VyBu5AMtckF9tMvgY0wliy Gp599VoTULe2UiIViJgUBjaP3E9wUxloofCvPfkde/61KrIsPhFyUePfzhj3l2CuBvbE X8oCr0UKESkpgc8pLH4zu5YFaaOPcJiojwZoPUwAVcvd5DMs4fC0aSFtr0XdUkeSdjrH t2Cw== X-Gm-Message-State: AJcUukd+3vNnycclUFseUL0cjSacL0JDFr0Tozxwef1wbAqFgrRDETTg BWAISQ84Y8FiUZp54/+FPXTr3aA= X-Google-Smtp-Source: ALg8bN4qYEIH6FOpaMtYa+01Y63HIliNgTx3Cd5sTuDofNN9Zn7PdEXa4eDG9qbJ/qRPuMnPocHcvw== X-Received: by 2002:a65:5387:: with SMTP id x7mr3491111pgq.412.1548277866615; Wed, 23 Jan 2019 13:11:06 -0800 (PST) Received: from ubuntu-vm.corp.microsoft.com ([2001:4898:80e8:f:a17f:4e9f:6b7c:507d]) by smtp.gmail.com with ESMTPSA id n73sm28063714pfj.148.2019.01.23.13.11.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 23 Jan 2019 13:11:05 -0800 (PST) From: Pavel Shilovsky X-Google-Original-From: Pavel Shilovsky To: linux-cifs@vger.kernel.org, Steve French , Ronnie Sahlberg Subject: [PATCH 11/15] CIFS: Set reconnect instance to one initially Date: Wed, 23 Jan 2019 13:10:41 -0800 Message-Id: <1548277845-6746-12-git-send-email-pshilov@microsoft.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1548277845-6746-1-git-send-email-pshilov@microsoft.com> References: <1548277845-6746-1-git-send-email-pshilov@microsoft.com> Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Currently we set reconnect instance to zero on the first connection but this is not convenient because we need to reserve some special value for credit handling on reconnects which is coming in subsequent patches. Fix this by starting with one when initiating a new TCP connection. Signed-off-by: Pavel Shilovsky --- fs/cifs/connect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index dc02b6d..3e7ad68 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -2588,7 +2588,7 @@ cifs_get_tcp_session(struct smb_vol *volume_info) volume_info->target_rfc1001_name, RFC1001_NAME_LEN_WITH_NULL); tcp_ses->session_estab = false; tcp_ses->sequence_number = 0; - tcp_ses->reconnect_instance = 0; + tcp_ses->reconnect_instance = 1; tcp_ses->lstrp = jiffies; spin_lock_init(&tcp_ses->req_lock); INIT_LIST_HEAD(&tcp_ses->tcp_ses_list);