]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.8.5/display-number-of-credits-available.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.8.5 / display-number-of-credits-available.patch
CommitLineData
39a3a1fe
GKH
1From 9742805d6b1bfb45d7f267648c34fb5bcd347397 Mon Sep 17 00:00:00 2001
2From: Steve French <smfrench@gmail.com>
3Date: Mon, 19 Sep 2016 22:06:35 -0500
4Subject: Display number of credits available
5
6From: Steve French <smfrench@gmail.com>
7
8commit 9742805d6b1bfb45d7f267648c34fb5bcd347397 upstream.
9
10In debugging smb3, it is useful to display the number
11of credits available, so we can see when the server has not granted
12sufficient operations for the client to make progress, or alternatively
13the client has requested too many credits (as we saw in a recent bug)
14so we can compare with the number of credits the server thinks
15we have.
16
17Add a /proc/fs/cifs/DebugData line to display the client view
18on how many credits are available.
19
20Signed-off-by: Steve French <steve.french@primarydata.com>
21Reported-by: Germano Percossi <germano.percossi@citrix.com>
22Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
23
24---
25 fs/cifs/cifs_debug.c | 1 +
26 1 file changed, 1 insertion(+)
27
28--- a/fs/cifs/cifs_debug.c
29+++ b/fs/cifs/cifs_debug.c
30@@ -152,6 +152,7 @@ static int cifs_debug_data_proc_show(str
31 list_for_each(tmp1, &cifs_tcp_ses_list) {
32 server = list_entry(tmp1, struct TCP_Server_Info,
33 tcp_ses_list);
34+ seq_printf(m, "\nNumber of credits: %d", server->credits);
35 i++;
36 list_for_each(tmp2, &server->smb_ses_list) {
37 ses = list_entry(tmp2, struct cifs_ses,