From patchwork Tue Jul 31 06:52:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve French X-Patchwork-Id: 10550159 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 294E5139A for ; Tue, 31 Jul 2018 06:52:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0EA9E283BF for ; Tue, 31 Jul 2018 06:52:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 00CAD2A352; Tue, 31 Jul 2018 06:52:46 +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 72357283BF for ; Tue, 31 Jul 2018 06:52:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726655AbeGaIbd (ORCPT ); Tue, 31 Jul 2018 04:31:33 -0400 Received: from mail-pg1-f182.google.com ([209.85.215.182]:39968 "EHLO mail-pg1-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726591AbeGaIbd (ORCPT ); Tue, 31 Jul 2018 04:31:33 -0400 Received: by mail-pg1-f182.google.com with SMTP id x5-v6so8596083pgp.7 for ; Mon, 30 Jul 2018 23:52:45 -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=z+MpIAuT+t2o+vkeyIhtqNoYuKdoDP7ihPNQZlV/F1E=; b=Y8/NyaBr6Wd5geeY5vcYwjCi4QBDUcRhy6NuI8zTF+niYrqI1UrK4zOPMdWwFfK3PF 7Wstk9Mecoa4LI6cGUfBLQAS02pxQDRtLLTIb0qQrBrlIX3ioYkjlAYoU12p/sz7/DKg 9hOzyj3rrhJa5ZHmkjMACyX4WwCf78ZXkOzN/l2oGiMIvKOH+sp8yCm1iuTxmib/aGOg oJK+m5BCbgseDk2KlBKIUfS4EMKbuAYJ7jZGfxPtgaSAxe94/zcii41dmc8w2cndLrme ZSOt7JvRXIbbvi+sENnVf4MWEH4uYxPMRki1zuLgViuIhg8qYagQtiK3bu9CcbWT1YCJ pTuA== 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=z+MpIAuT+t2o+vkeyIhtqNoYuKdoDP7ihPNQZlV/F1E=; b=ig08s0IWrbEf8TXW9ZQ45lIt0ma0Svi7fEhGCcHs5+6P7oV43ZR+8Ygy4qaLzfMxf8 LAcofBCFT4JfhXRKEVc8kg4639aGujcmm+7gtWYMSmA5eDD4j3NlwqI/i47/m/IJ415i W5ZQ1Q4uETh+BdhMTv38f7AD++O9KkYE/eKaNaGli1KyB3KOJ7vDCLr2zK114+2D0Yba ANQvDUNdTOEqrAPs4uRmcr0AhOpIZsDzYeq3oG1Ye6kMD9OdiWTbuaDqZWY3b5xKN0W0 wVhBrNpLmpOHulCdi4DGaJGBU0qfgY2wBHRrFhRqmOqFczIRfPwAJrPmcvzE1ktvqov5 zkYQ== X-Gm-Message-State: AOUpUlGIMzz8W5TgkeT+iz+1JdA5EuuGs4k1bdBpWo8v/YmxUfp58R0D RCXZe7flosWC1VHbsb2lFx9hffLZD3SZhJTURBFqiUJf X-Google-Smtp-Source: AAOMgpefLnBMyFsJt8b3lqNOFclVApG6SHJVmW7biXZ5fVDgjHiQfgU5nA7nNJ9knUpSkpoOotN+EPhtskxGiQRMJwY= X-Received: by 2002:a63:1d3:: with SMTP id 202-v6mr19052479pgb.136.1533019964706; Mon, 30 Jul 2018 23:52:44 -0700 (PDT) MIME-Version: 1.0 From: Steve French Date: Tue, 31 Jul 2018 01:52:33 -0500 Message-ID: Subject: smb3: display bytes_read and bytes_written in stats as we do for cifs 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 From 27a2394b231a2aa633ae1e21d57f0b92b804fbd1 Mon Sep 17 00:00:00 2001 From: Steve French Date: Tue, 31 Jul 2018 01:46:47 -0500 Subject: [PATCH] smb3: display bytes_read and bytes_written in smb3 stats We were only displaying bytes_read and bytes_written in cifs stats, fix smb3 stats to also display them. Sample output with this patch: cat /proc/fs/cifs/Stats: CIFS Session: 1 Share (unique mount targets): 2 SMB Request/Response Buffer: 1 Pool size: 5 SMB Small Req/Resp Buffer: 1 Pool size: 30 Operations (MIDs): 0 0 session 0 share reconnects Total vfs operations: 94 maximum at one time: 2 1) \\localhost\test SMBs: 214 Bytes read: 502092 Bytes written: 31457286 TreeConnects: 1 total 0 failed TreeDisconnects: 0 total 0 failed Creates: 52 total 3 failed Closes: 48 total 0 failed Flushes: 0 total 0 failed Reads: 17 total 0 failed Writes: 31 total 0 failed ... Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg --- fs/cifs/smb2ops.c | 3 +++ 1 file changed, 3 insertions(+) seq_printf(m, "\nTreeConnects: %d total %d failed", atomic_read(&sent[SMB2_TREE_CONNECT_HE]), atomic_read(&failed[SMB2_TREE_CONNECT_HE])); From 27a2394b231a2aa633ae1e21d57f0b92b804fbd1 Mon Sep 17 00:00:00 2001 From: Steve French Date: Tue, 31 Jul 2018 01:46:47 -0500 Subject: [PATCH] smb3: display bytes_read and bytes_written in smb3 stats We were only displaying bytes_read and bytes_written in cifs stats, fix smb3 stats to also display them. Sample output with this patch: cat /proc/fs/cifs/Stats: CIFS Session: 1 Share (unique mount targets): 2 SMB Request/Response Buffer: 1 Pool size: 5 SMB Small Req/Resp Buffer: 1 Pool size: 30 Operations (MIDs): 0 0 session 0 share reconnects Total vfs operations: 94 maximum at one time: 2 1) \\localhost\test SMBs: 214 Bytes read: 502092 Bytes written: 31457286 TreeConnects: 1 total 0 failed TreeDisconnects: 0 total 0 failed Creates: 52 total 3 failed Closes: 48 total 0 failed Flushes: 0 total 0 failed Reads: 17 total 0 failed Writes: 31 total 0 failed ... Signed-off-by: Steve French --- fs/cifs/smb2ops.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c index 831249001384..85e848007f91 100644 --- a/fs/cifs/smb2ops.c +++ b/fs/cifs/smb2ops.c @@ -950,6 +950,9 @@ smb2_print_stats(struct seq_file *m, struct cifs_tcon *tcon) * Can't display SMB2_NEGOTIATE, SESSION_SETUP, LOGOFF, CANCEL and ECHO * totals (requests sent) since those SMBs are per-session not per tcon */ + seq_printf(m, "\nBytes read: %llu Bytes written: %llu", + (long long)(tcon->bytes_read), + (long long)(tcon->bytes_written)); seq_printf(m, "\nTreeConnects: %d total %d failed", atomic_read(&sent[SMB2_TREE_CONNECT_HE]), atomic_read(&failed[SMB2_TREE_CONNECT_HE])); -- 2.17.1