aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifs_debug.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2005-10-07 12:51:05 -0400
committerSteve French <sfrench@us.ibm.com>2005-10-07 12:51:05 -0400
commit131afd0b748e382c3a00355d3fa245801f929298 (patch)
tree1581222aa48c6610877b3cc3bd5a4d275a6a68cd /fs/cifs/cifs_debug.c
parentdd99cd803d460576cf84f012786ff39814b73f7f (diff)
[CIFS] /proc/fs/cifs debug code cleanup and new stats2
These changes to debug code and new stats are helpful in debugging potential tcp performance/configuration problems under cifs. Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/cifs_debug.c')
-rw-r--r--fs/cifs/cifs_debug.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c
index f4c6544468ab..785239618d89 100644
--- a/fs/cifs/cifs_debug.c
+++ b/fs/cifs/cifs_debug.c
@@ -81,6 +81,8 @@ cifs_debug_data_read(char *buf, char **beginBuffer, off_t offset,
81 buf += length; 81 buf += length;
82 length = sprintf(buf,"CIFS Version %s\n",CIFS_VERSION); 82 length = sprintf(buf,"CIFS Version %s\n",CIFS_VERSION);
83 buf += length; 83 buf += length;
84 length = sprintf(buf,"Active VFS Requests: %d\n", GlobalTotalActiveXid);
85 buf += length;
84 length = sprintf(buf, "Servers:"); 86 length = sprintf(buf, "Servers:");
85 buf += length; 87 buf += length;
86 88
@@ -97,7 +99,7 @@ cifs_debug_data_read(char *buf, char **beginBuffer, off_t offset,
97 } else { 99 } else {
98 length = 100 length =
99 sprintf(buf, 101 sprintf(buf,
100 "\n%d) Name: %s Domain: %s Mounts: %d ServerOS: %s \n\tServerNOS: %s\tCapabilities: 0x%x\n\tSMB session status: %d\t", 102 "\n%d) Name: %s Domain: %s Mounts: %d OS: %s \n\tNOS: %s\tCapability: 0x%x\n\tSMB session status: %d\t",
101 i, ses->serverName, ses->serverDomain, 103 i, ses->serverName, ses->serverDomain,
102 atomic_read(&ses->inUse), 104 atomic_read(&ses->inUse),
103 ses->serverOS, ses->serverNOS, 105 ses->serverOS, ses->serverNOS,
@@ -105,12 +107,18 @@ cifs_debug_data_read(char *buf, char **beginBuffer, off_t offset,
105 buf += length; 107 buf += length;
106 } 108 }
107 if(ses->server) { 109 if(ses->server) {
108 buf += sprintf(buf, "TCP status: %d\n\tLocal Users To Server: %d SecMode: 0x%x Req Active: %d", 110 buf += sprintf(buf, "TCP status: %d\n\tLocal Users To Server: %d SecMode: 0x%x Req On Wire: %d",
109 ses->server->tcpStatus, 111 ses->server->tcpStatus,
110 atomic_read(&ses->server->socketUseCount), 112 atomic_read(&ses->server->socketUseCount),
111 ses->server->secMode, 113 ses->server->secMode,
112 atomic_read(&ses->server->inFlight)); 114 atomic_read(&ses->server->inFlight));
113 115
116#ifdef CONFIG_CIFS_STATS2
117 buf += sprintf(buf, "\tIn Send: %d In MaxReq Wait: %d",
118 atomic_read(&ses->server->inSend),
119 atomic_read(&ses->server->num_waiters));
120#endif
121
114 length = sprintf(buf, "\nMIDs:\n"); 122 length = sprintf(buf, "\nMIDs:\n");
115 buf += length; 123 buf += length;
116 124
@@ -149,7 +157,7 @@ cifs_debug_data_read(char *buf, char **beginBuffer, off_t offset,
149 dev_type = le32_to_cpu(tcon->fsDevInfo.DeviceType); 157 dev_type = le32_to_cpu(tcon->fsDevInfo.DeviceType);
150 length = 158 length =
151 sprintf(buf, 159 sprintf(buf,
152 "\n%d) %s Uses: %d Type: %s Characteristics: 0x%x Attributes: 0x%x\nPathComponentMax: %d Status: %d", 160 "\n%d) %s Uses: %d Type: %s DevInfo: 0x%x Attributes: 0x%x\nPathComponentMax: %d Status: %d",
153 i, tcon->treeName, 161 i, tcon->treeName,
154 atomic_read(&tcon->useCount), 162 atomic_read(&tcon->useCount),
155 tcon->nativeFileSystem, 163 tcon->nativeFileSystem,