From patchwork Sun Sep 16 04:11:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve French X-Patchwork-Id: 10601645 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 DFAF313AD for ; Sun, 16 Sep 2018 04:11:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B4C1D29E24 for ; Sun, 16 Sep 2018 04:11:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A688929E3B; Sun, 16 Sep 2018 04:11:51 +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 7AE6B29E24 for ; Sun, 16 Sep 2018 04:11:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726338AbeIPJdU (ORCPT ); Sun, 16 Sep 2018 05:33:20 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:41652 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726277AbeIPJdT (ORCPT ); Sun, 16 Sep 2018 05:33:19 -0400 Received: by mail-pl1-f194.google.com with SMTP id b12-v6so5895745plr.8 for ; Sat, 15 Sep 2018 21:11:49 -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=xadpRfQwfFBdaPt0eDFcTkAmzCfT3kZ8J5uhDsti/30=; b=sQBFKHu1/FM3db5GlhfYNl2MXx8ySY8xXQoVSwaWFpUsQ2FLDeH9dta4GfiKh0/oui s8BXyaKt76kPRwUoKxobI627TodKYtq6hjBnfxMdvLlEyz7lBDKt1sQDC6AusDI4Bb+w XHOqhqeFTAxVDqqP4kycBwbVjELsQR/wy2kfjoM2/eAlD55E/YK0/sbYy8tY9sFdSa4x NI5H8LlV99jqny+BUHOyD9lQpYQ9GFZBho6zeSqpG7SaUkwpUJbHFveIOSorq8irVrTP Amcarv2ENUZOo7fFn7NnU6spSvo3pWZqugGN0Ib3gjN4igcOxLNooVtCfdWrM3oEX5r4 xUzw== 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=xadpRfQwfFBdaPt0eDFcTkAmzCfT3kZ8J5uhDsti/30=; b=I+m15TfiW/t6JlVJ5Odi9HscdjHXa1Iqpfn7YMSkRaggDBryDwW0m75QlrOlePF12p jI1UX+p0/gDNMvaZgWHhYJafTbIfpRUKr5b5OX23LhglNInJqkA6gdmfrvi8YbeCuEny bdRCMfcbjzopuruetG7oAtdYKlOnd5NmrqjzlT++urdc0Zg5Dg3XbGqbBucx/Z/9grZX 3FFxCS2+9HacDLbSpEjyhMD7Rbw1PJpfXp8a1kEFYyChqtm3axYKFy2ZL33DLloMBOo5 1crQNZZ9U0L39VMQHoMqFXCL+TFvP2lShVD07LgEdgu9mn8uCUtejhgVadfkFWwLqvCC PUJw== X-Gm-Message-State: APzg51AMQCsudobKJRR8SOCo/8/+KUz65dhd+JBRy6rLnnCfRZjgt2gi VfQhqRK48WxmaQDPRcMy6EqHjO7jrUmXxnC6M2comoqF X-Google-Smtp-Source: ANB0VdaI5Hnk2JTLtUtLGoITn0d6ThqlpKHPODAG/FIqJI4OpRve9ehphqzdUHLyotbcbJu9sMp9MtAC+ZSP1ZCegRc= X-Received: by 2002:a17:902:e85:: with SMTP id 5-v6mr18519209plx.73.1537071108279; Sat, 15 Sep 2018 21:11:48 -0700 (PDT) MIME-Version: 1.0 From: Steve French Date: Sat, 15 Sep 2018 23:11:36 -0500 Message-ID: Subject: [PATCH] smb3: allow stats which track session and share reconnects to be reset 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 Currently, "echo 0 > /proc/fs/cifs/Stats" resets all of the stats except the session and share reconnect counts. Fix it to reset those as well. CC: Stable Signed-off-by: Steve French --- fs/cifs/cifs_debug.c | 3 +++ 1 file changed, 3 insertions(+) From 0a8b2febaa60577a189744829183e563afa47684 Mon Sep 17 00:00:00 2001 From: Steve French Date: Sat, 15 Sep 2018 23:04:41 -0500 Subject: [PATCH] smb3: allow stats which track session and share reconnects to be reset Currently, "echo 0 > /proc/fs/cifs/Stats" resets all of the stats except the session and share reconnect counts. Fix it to reset those as well. CC: Stable Signed-off-by: Steve French --- fs/cifs/cifs_debug.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c index f1fbea947fef..7a6eb80ba3dc 100644 --- a/fs/cifs/cifs_debug.c +++ b/fs/cifs/cifs_debug.c @@ -383,6 +383,9 @@ static ssize_t cifs_stats_proc_write(struct file *file, atomic_set(&totBufAllocCount, 0); atomic_set(&totSmBufAllocCount, 0); #endif /* CONFIG_CIFS_STATS2 */ + atomic_set(&tcpSesReconnectCount, 0); + atomic_set(&tconInfoReconnectCount, 0); + spin_lock(&GlobalMid_Lock); GlobalMaxActiveXid = 0; GlobalCurrentXid = 0; -- 2.17.1