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: 951430 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-cifs-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Y8/NyaBr"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 41fnFC0ns1z9ryn for ; Tue, 31 Jul 2018 16:52:47 +1000 (AEST) 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 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