From patchwork Fri Feb 1 20:04:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Shilovsky X-Patchwork-Id: 10793667 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 52E8D1390 for ; Fri, 1 Feb 2019 20:04:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4556B32C9E for ; Fri, 1 Feb 2019 20:04:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 39584330BE; Fri, 1 Feb 2019 20:04:39 +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 E3D6132C9E for ; Fri, 1 Feb 2019 20:04:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730654AbfBAUEi (ORCPT ); Fri, 1 Feb 2019 15:04:38 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:45606 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730734AbfBAUEi (ORCPT ); Fri, 1 Feb 2019 15:04:38 -0500 Received: by mail-pf1-f195.google.com with SMTP id g62so3720628pfd.12 for ; Fri, 01 Feb 2019 12:04:38 -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=ogcXlVKO9zD1c7jsLlT35CeyUPu7LA9uWQ8SYeUmzHo=; b=fyTVgr3TIlgLVJkxb1n7c54DNJ0Q+m6uVcpjQ/P4iu/HCUvDu/oGxGhibFad3/kSh3 lNEs+AR2aYXmkh0Z3nunvQzXz0hKme5ATjWLw319iQZCYZBuKzPVr8vy8CbV16UgD7c5 lrZBIwM/b9tE7nj7i7gPqnB+VSMYGbhnkTmS8bU6lH3ge8rjcMp7ACG1lkcjqP+raKCh 3MWrS19eD8NQxmOaj2Yb7hWq8x5qPuoI8Gqt4CYI6bM7+ofSKqmNLCW+slV0V1lxuasZ q5ovZa6E13OemvcFBlWx8oFsQxvPalbeR8gBO4bcb0NDA0wp+wHnwPV53zbFwH5TRGZV NXkQ== 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=ogcXlVKO9zD1c7jsLlT35CeyUPu7LA9uWQ8SYeUmzHo=; b=WBHYq+pxOTv/QmmOZhjNCk/eTdkvTCRXHoEs+oJceZGomD7BX1Hfy4y92Kflsh1DDm UdGnyylSrCKGaPymihsDQG339W5yAk8SHDbr0SrE6f5ggbaySRqs7+pHn2HUY2xROrW+ 1VqqdLvlmjnQOZtiL6rTyPn+q3zOr4wDW37ZMCxeml/PRc9nd8/etirjqo8BPAEeHHx1 PNnOhqT4/gEMEnZhCE98fP6ovP/lt+JiA1kgFuQ0qfLuRzrLKdmGXmaNQDnBk6XqRUC4 cA0GEw9Mi0A8dBmRrSL014+H48a+YNlPkhI+FMDZ4YYqZfjEVLaIWkcomkzcevgSHs64 pn3g== X-Gm-Message-State: AHQUAuZ7jozs6UMxYrHCyvgD/YR9v8giePsSzhi7M8XQlt9fxlaRHBxv PVaM2YNy9IuUDi2pGuB4xTwiwfI= X-Google-Smtp-Source: AHgI3IZBgTU2A+cZWR13+UX+UmO76kyYCgBIJ5dVHNk2F7kj3qV/9YDfVX7k1T096E3VyaTmtA4VMg== X-Received: by 2002:a63:db02:: with SMTP id e2mr3542123pgg.419.1549051477326; Fri, 01 Feb 2019 12:04:37 -0800 (PST) Received: from ubuntu-vm.corp.microsoft.com ([2001:4898:80e8:0:a18e:4e9f:6b7c:507d]) by smtp.gmail.com with ESMTPSA id x11sm24247451pfe.72.2019.02.01.12.04.36 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 01 Feb 2019 12:04:36 -0800 (PST) From: Pavel Shilovsky X-Google-Original-From: Pavel Shilovsky To: linux-cifs@vger.kernel.org Subject: [PATCH 11/23] CIFS: Set reconnect instance to one initially Date: Fri, 1 Feb 2019 12:04:00 -0800 Message-Id: <1549051452-5968-13-git-send-email-pshilov@microsoft.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1549051452-5968-1-git-send-email-pshilov@microsoft.com> References: <1549051452-5968-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 Signed-off-by: Steve French --- 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 67af18a..f771ad4 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -2609,7 +2609,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);