From patchwork Mon Jul 30 19:27:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve French X-Patchwork-Id: 10549597 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 ED14714E0 for ; Mon, 30 Jul 2018 19:28:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D46CF297CA for ; Mon, 30 Jul 2018 19:28:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C7A2D29800; Mon, 30 Jul 2018 19:28:07 +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,HTML_MESSAGE,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 51AF0297CA for ; Mon, 30 Jul 2018 19:28:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731962AbeG3VEd (ORCPT ); Mon, 30 Jul 2018 17:04:33 -0400 Received: from mail-pl0-f48.google.com ([209.85.160.48]:33615 "EHLO mail-pl0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731906AbeG3VEc (ORCPT ); Mon, 30 Jul 2018 17:04:32 -0400 Received: by mail-pl0-f48.google.com with SMTP id 6-v6so5993331plb.0 for ; Mon, 30 Jul 2018 12:28:04 -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=OxZGg8fIseSyNAlm7v1KIGEQ27wWSu1GeRDpH1Fqx/k=; b=hGZqAsCwGutCAHhMlVcBEOa7Y4wvdRyQ7bnfvezp8JKkwHOt4TevY665QfdCHGtGte W030cIiylJq00U2IvksjZxJYSVAA+Ql4gzimZmbCxWuQs1dCckYe2nOJ8mYXy25lvmV2 ojzPxIa3RBtzx8R2yZuu2SNgsRKfmW1WncJ8eFx6bhd548m6BhMck8BBFDzPvjGLTmG4 ukQjWHs03udIKhtIHeXdgT7ezuKtKstyb7d2skWm2Q/nuFaMF5ntefAYRKlEi+vWWtE4 f/yb+MvzTRqohAFBdkjbkLbeNdZp/WnJPTaWZnUMGjLU1nXGnkIIXxrf4p8L36Kk0sSx pB2w== 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=OxZGg8fIseSyNAlm7v1KIGEQ27wWSu1GeRDpH1Fqx/k=; b=IWsEQgIXpIrNRBmN0NyTBs3K3VgYkHqA65Esihl3xMFwdHVgczoq9LOjQ29tIqAdsD TSD2fhRoIULjFvJOZC2sKdKtM81FmFQ9CA7987hQGCD5YE2FmVbcFQK7hdFJj0Z7IYzL KWWJSfnPL1MoZAe5EHS5vG3fX4oYEcmP5HqTIDDAOMgQ2VK3CUyJFH6NREdAFFliu7Nv XeupU4Xp4gEELrdEVjeS3KeSjn1cu8DpbvdBAdlX10MNH6v0i+VkF2KlsM8YIElmHUZD afF2iQcra+YZlyZ4HR1Qj8Xt5n/woQWVkX+EmxPsrGmpTkM1qu/Fgsp24l/ygPH5cJCo uthg== X-Gm-Message-State: AOUpUlEFM4v8jIwSgbEsp0ymZiqi5JagMMCLUVybmxAolr44YciCoKk9 69+QdfplopFQ+aN5CPz5WkxVjfGWBQgpr2PPlNlDAR2P X-Google-Smtp-Source: AAOMgpcKFreVc4s1VoB1p9+KdrfsMz/0QrONelIV9+TFF0WzNkaamBCWSXTCRXxiI5bAoGTU4zqwbfAuxzClZh2vXxA= X-Received: by 2002:a17:902:20e9:: with SMTP id v38-v6mr17715513plg.107.1532978883954; Mon, 30 Jul 2018 12:28:03 -0700 (PDT) MIME-Version: 1.0 From: Steve French Date: Mon, 30 Jul 2018 14:27:52 -0500 Message-ID: Subject: [PATCH] Add tracepoint for session deleted/expired 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 In debugging reconnection problems, want to be able to more easily trace cases in which the server has marked the SMB3 session expired or deleted (to distinguish from timeout cases). Signed-off-by: Steve French From 7612cc55f65b80e0d7cac1465455e2ffabdfc05a Mon Sep 17 00:00:00 2001 From: Steve French Date: Mon, 30 Jul 2018 14:23:58 -0500 Subject: [PATCH] smb3: add tracepoint for session expired or deleted In debugging reconnection problems, want to be able to more easily trace cases in which the server has marked the SMB3 session expired or deleted (rather than timeout cases). Signed-off-by: Steve French --- fs/cifs/smb2ops.c | 4 ++++ fs/cifs/trace.h | 1 + 2 files changed, 5 insertions(+) diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c index dad6dc763200..314556c083f3 100644 --- a/fs/cifs/smb2ops.c +++ b/fs/cifs/smb2ops.c @@ -1483,7 +1483,11 @@ smb2_is_session_expired(char *buf) shdr->Status != STATUS_USER_SESSION_DELETED) return false; + trace_smb3_ses_expired(shdr->TreeId, shdr->SessionId, + le16_to_cpu(shdr->Command), + le64_to_cpu(shdr->MessageId)); cifs_dbg(FYI, "Session expired or deleted\n"); + return true; } diff --git a/fs/cifs/trace.h b/fs/cifs/trace.h index 67e413f6ee4d..0fdf2f5c07ba 100644 --- a/fs/cifs/trace.h +++ b/fs/cifs/trace.h @@ -281,6 +281,7 @@ DEFINE_EVENT(smb3_cmd_done_class, smb3_##name, \ TP_ARGS(tid, sesid, cmd, mid)) DEFINE_SMB3_CMD_DONE_EVENT(cmd_done); +DEFINE_SMB3_CMD_DONE_EVENT(ses_expired); DECLARE_EVENT_CLASS(smb3_exit_err_class, TP_PROTO(unsigned int xid, -- 2.17.1