From patchwork Sun Apr 8 21:18:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve French X-Patchwork-Id: 10328561 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 60C796053B for ; Sun, 8 Apr 2018 21:19:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 408E5289A7 for ; Sun, 8 Apr 2018 21:19:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 34D0D28A24; Sun, 8 Apr 2018 21:19:23 +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=-7.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_TVD_MIME_EPI 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 D49B9289A7 for ; Sun, 8 Apr 2018 21:19:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752491AbeDHVTV (ORCPT ); Sun, 8 Apr 2018 17:19:21 -0400 Received: from mail-pl0-f49.google.com ([209.85.160.49]:38731 "EHLO mail-pl0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752289AbeDHVTV (ORCPT ); Sun, 8 Apr 2018 17:19:21 -0400 Received: by mail-pl0-f49.google.com with SMTP id c7-v6so648452plr.5 for ; Sun, 08 Apr 2018 14:19:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=6DJTU87UQz1Fx3sHoDP/BfZrxqksKxysuCvPGpH3ewI=; b=jRUphw1ZeQnB54nj67Ym9LKxxplnNJ/wLKwX9ZPYJjNm/EFcUZHzSUDe86NprjVVOd 5VouZM1Xqs/MifrRP2IIY6MveJSw+qu/cv95TI+KXu1ULsDrhF9SbhHNj3tUqQt73tgG +dEX9aJMeRvnuOVtTQtMawn8GU0NUvldmDA/eeqy+OKiqm8CTa6nlef11BCQ3wjNkII0 IWkKL08QYVA7n6qkdTdPGpn1ZRhMHcwPNuutDGaWms1Bcka4ujBi4FXduQ6mQH0P1MJr wzRcQ88N+OeuLwmKfTlIBEw+k742mMQurL4QOnXOxSAmKPB9gytf34J05MA26zzYB7Ny CaxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=6DJTU87UQz1Fx3sHoDP/BfZrxqksKxysuCvPGpH3ewI=; b=q9lexU/XrjhEVTIXqZM4pxnlrTqeeNzsZYwTkHRFaivmggkonKmwoLUrZOq9HDcKjI mFUi9PEufETX5aV1gYdE78BtToUgvdlhGoeaElhwT6px8aOzXMjwdMMdrWubsV08s5fS jUfKARhVf9zvw/IoAQBEpRxt/E9dw1Wcp2t4UJTISRxhvIMB2o4nBomCOqEwQ3Yb9J0d 3m8WucD/4pbq7ua9SakePVskb/jt6w+PwQSHo4oMGzuYBawpAMaZ1eAdKONzfrQ3l6+i e8W6PQ0g9jL6fiY2P9NZyE/dDo0AxRY4td3iMHUk9WVWa96VJYnu46u7iy+fwqXhVRxG HHhA== X-Gm-Message-State: AElRT7FiRoG/Ne46ISiAelRHBdAvDUbpgb5yhO391DkEc0esQa1hboSi d3G9xhGQRLQQu2uwIp27pIVMJdpxYcW51doTolEpF7wk X-Google-Smtp-Source: AIpwx4+TVklhx3i569RXa1tymJonhZLbQkomsvIiHWZpUDNhP6n9mq2z4iUA2hccv1OASia9sms+3iYrcqXfXW9kB/8= X-Received: by 2002:a17:902:1006:: with SMTP id b6-v6mr36263748pla.252.1523222360360; Sun, 08 Apr 2018 14:19:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.152.97 with HTTP; Sun, 8 Apr 2018 14:18:59 -0700 (PDT) From: Steve French Date: Sun, 8 Apr 2018 16:18:59 -0500 Message-ID: Subject: [PATCH] Log at least once if tree connect fails To: CIFS 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 Adding an extra debug message to show if a tree connect failure during reconnect (and made it a log once so it doesn't spam the logs). Saw a case recently where tree connect repeatedly returned access denied on reconnect and it wasn't as easy to spot as it should have been. See attached patch Reviewed-by: Aurelien Aptel From 595a5a015855b8e6e2ace128ca6d56ae62c3fa6c Mon Sep 17 00:00:00 2001 From: Steve French Date: Wed, 4 Apr 2018 14:08:52 -0500 Subject: [PATCH] SMB3: Log at least once if tree connect fails during reconnect Adding an extra debug message to show if a tree connect failure during reconnect (and made it a log once so it doesn't spam the logs). Saw a case recently where tree connect repeatedly returned access denied on reconnect and it wasn't as easy to spot as it should have been. Signed-off-by: Steve French --- fs/cifs/cifssmb.c | 4 +++- fs/cifs/smb2pdu.c | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index 59c09a596c0a..abdc93d4fee8 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c @@ -206,8 +206,10 @@ cifs_reconnect_tcon(struct cifs_tcon *tcon, int smb_command) mutex_unlock(&ses->session_mutex); cifs_dbg(FYI, "reconnect tcon rc = %d\n", rc); - if (rc) + if (rc) { + printk_once(KERN_WARNING "reconnect tcon failed rc = %d\n", rc); goto out; + } atomic_inc(&tconInfoReconnectCount); diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c index e5ac474d5d87..6c2910e6c984 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c @@ -268,8 +268,11 @@ smb2_reconnect(__le16 smb2_command, struct cifs_tcon *tcon) mutex_unlock(&tcon->ses->session_mutex); cifs_dbg(FYI, "reconnect tcon rc = %d\n", rc); - if (rc) + if (rc) { + /* If sess reconnected but tcon didn't, something strange ... */ + printk_once(KERN_WARNING "reconnect tcon failed rc = %d\n", rc); goto out; + } if (smb2_command != SMB2_INTERNAL_CMD) queue_delayed_work(cifsiod_wq, &server->reconnect, 0); -- 2.14.1