Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp733597imm; Thu, 13 Sep 2018 07:00:50 -0700 (PDT) X-Google-Smtp-Source: ANB0VdY1cl2df1+eUsVKk84SM1tpQeBTrmERYd8vlHETPiuVlKMv++fXir04m2Tlx7HmQNK/pv1w X-Received: by 2002:a62:e11:: with SMTP id w17-v6mr7758927pfi.242.1536847250913; Thu, 13 Sep 2018 07:00:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536847250; cv=none; d=google.com; s=arc-20160816; b=qSnlbOR05l7OB4wLK9TAGYuFA3TiYxdFrk267LwOrV+svAOOR67TM7AsWMipO+9aBh 0zb9i46ujc2jGAGqQLzXD6PZDpL3pLX0RDzgWThZHUP+vsgU21lRZqJW3rffaN2cZa8I 46M7j942AYDSzHlh2GhwMiGcsgCt7cinojlGtHF6l6SjyRf3eqCTu71GOW10Wyrm/j8w a2OJvgRNneSjMAztkCbiYxFNrcWUusZYsosMKVJaRPeti60T4rBj50ONvH5kzWu+9RJz ktBhVQJaLmOpSqKvIo7ju7x+2cnCHhmVgDLBb4Da4+niZVfYLmBEHv187VmAoBH2UMnc zHBw== 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=2JjzMzgo3cWumYGmRhnt04w9SlJM1KR6icm6KtR/k7c=; b=YZI6jANpAwNw7eob6ven7xT3HCTAG6K0VcVX5jDZjwOu1sl7r776zFcQF9Z8U1Bw3H MfFBrHV3j/jBYlMUDRG25ryNhZbwfqfP2FIxXmwxndDc56PXSiWSAXDDvTnyzIPPYuWY OJ08WDbMZLBMIhAAmMWbC8AwSFy01cg6YVHm+nt0pkadYbeeY2h4+O5LzbGwCVTCQPgz R4QShCMqPIwF0Ptug010TwV9spYk5ajUFNOXTuB2v53RwifcD2OhjyqqN13mzTQgwieV TIgU4uMvQ1EyDO5/1uBYFqVCx17yOeZqkmD0aBE3mqYEJ3TA57a/IiVXPA5AGBuVq1dT tNpw== 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 5-v6si3981303plx.27.2018.09.13.07.00.35; Thu, 13 Sep 2018 07:00:50 -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 S1731705AbeIMTIx (ORCPT + 99 others); Thu, 13 Sep 2018 15:08:53 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:34812 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731503AbeIMTIx (ORCPT ); Thu, 13 Sep 2018 15:08:53 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 0F1E0D15; Thu, 13 Sep 2018 13:59:14 +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.18 122/197] SMB3: Number of requests sent should be displayed for SMB3 not just CIFS Date: Thu, 13 Sep 2018 15:31:11 +0200 Message-Id: <20180913131846.426242360@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180913131841.568116777@linuxfoundation.org> References: <20180913131841.568116777@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.18-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 @@ -360,7 +360,7 @@ smb2_plain_req_init(__le16 smb2_command, 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