Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp718277imm; Thu, 13 Sep 2018 06:46:42 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbmarPtolF9QficwTaQV5ycyPsj5D4507fRd/BODrhUeii5DJtEqMddaU0uL5o/8iOlaWFC X-Received: by 2002:a62:401:: with SMTP id 1-v6mr7547769pfe.28.1536846402107; Thu, 13 Sep 2018 06:46:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536846402; cv=none; d=google.com; s=arc-20160816; b=PRWH29o3bMmlAKVHtonHbjQezxr1CKEfw1mBffE2WSN35aG4rsPN+hHcCYNc1BsTFu iMKY3uD4IkbCz59v07juc3eHXoKEtzByRRrM/g//Uo87ZXSXOuMLLweOu4ot3nKY8efn esB6oPKnj5ZoO3mCKbyJBsWF+Z42rpPYymbMqbze7V3+1SGaDETW9vtN1V2bluO+CFBK nUPW256Ndz3r4Gpgk9YwAMXCyLL80tcthARHBDWcCp3J/8DGKOcIVbmNzRn7f0nmJgpI uy5CSEhl1Prg8d6p0wLX8y+9fQvDeoqhwSomf/rMva/rt+A8enM2DtljC8QdZTBmFmOg OW2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=GZrauUg7yDkSJpB535UWNakQCVL37k5ybGIBlOIWgrU=; b=WObgshQjLetVl3xh4a2gBq6875YxgVjvGc5L4k+vXT4dRihrl19+lJ1a1gOvUnBPdo 1T6z3WRN431Garawwn4hF/kyuFxNyVXboRFAqHBMQplSWnz/QDAevFeFmnIshIcK3NE5 QsMuWx96YPNDUnq/H1OvYlkemaBsxLXm8ivoj+HHYSPQrR4gXcnezzmWpHlMVc1I4mZI mcRW2PcIQO86p/5wQZOQi4QJINgFGuqqq6YYqcd7xfXKGEUuDeL/G8Ne52jgruztsy9Q +daeDUjW4eKOmLcksWPcXGOmBnodiRQ56EOEVWGLMgC6fEGHj4dON5L2SUs6r6CuMFi6 0J/w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z4-v6si3967660pgf.193.2018.09.13.06.46.26; Thu, 13 Sep 2018 06:46:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730225AbeIMSzh (ORCPT + 99 others); Thu, 13 Sep 2018 14:55:37 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:60792 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729449AbeIMSzh (ORCPT ); Thu, 13 Sep 2018 14:55:37 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 76608D10; Thu, 13 Sep 2018 13:46:03 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Steve French , Aurelien Aptel , Pavel Shilovsky , Sasha Levin Subject: [PATCH 4.14 073/115] SMB3: Number of requests sent should be displayed for SMB3 not just CIFS Date: Thu, 13 Sep 2018 15:31:33 +0200 Message-Id: <20180913131828.167549249@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180913131823.327472833@linuxfoundation.org> References: <20180913131823.327472833@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Steve French [ Upstream commit 289131e1f1e6ad8c661ec05e176b8f0915672059 ] For SMB2/SMB3 the number of requests sent was not displayed in /proc/fs/cifs/Stats unless CONFIG_CIFS_STATS2 was enabled (only number of failed requests displayed). As with earlier dialects, we should be displaying these counters if CONFIG_CIFS_STATS is enabled. They are important for debugging. e.g. when you cat /proc/fs/cifs/Stats (before the patch) Resources in use 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: 690 maximum at one time: 2 1) \\localhost\test SMBs: 975 Negotiates: 0 sent 0 failed SessionSetups: 0 sent 0 failed Logoffs: 0 sent 0 failed TreeConnects: 0 sent 0 failed TreeDisconnects: 0 sent 0 failed Creates: 0 sent 2 failed Closes: 0 sent 0 failed Flushes: 0 sent 0 failed Reads: 0 sent 0 failed Writes: 0 sent 0 failed Locks: 0 sent 0 failed IOCTLs: 0 sent 1 failed Cancels: 0 sent 0 failed Echos: 0 sent 0 failed QueryDirectories: 0 sent 63 failed Signed-off-by: Steve French Reviewed-by: Aurelien Aptel Reviewed-by: Pavel Shilovsky Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- fs/cifs/smb2pdu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c @@ -393,7 +393,7 @@ small_smb2_init(__le16 smb2_command, str pdu->hdr.smb2_buf_length = cpu_to_be32(total_len); if (tcon != NULL) { -#ifdef CONFIG_CIFS_STATS2 +#ifdef CONFIG_CIFS_STATS uint16_t com_code = le16_to_cpu(smb2_command); cifs_stats_inc(&tcon->stats.smb2_stats.smb2_com_sent[com_code]); #endif