summaryrefslogtreecommitdiffstats
path: root/fs/cifs/misc.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2005-12-03 13:58:57 -0800
committerSteve French <sfrench@us.ibm.com>2005-12-03 13:58:57 -0800
commit4498eed50a114565debd38f173acd62cce6e7cb8 (patch)
tree8a94482e9a7b98bb32aab518a0fce74075eabd2f /fs/cifs/misc.c
parent84afc29b185334f489975a003b128e1b15e24a54 (diff)
downloadlinux-stable-4498eed50a114565debd38f173acd62cce6e7cb8.tar.gz
linux-stable-4498eed50a114565debd38f173acd62cce6e7cb8.tar.bz2
linux-stable-4498eed50a114565debd38f173acd62cce6e7cb8.zip
[CIFS] Add extended stats (STATS2) for total buffer allocations for
better performance debugging. Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/misc.c')
-rw-r--r--fs/cifs/misc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c
index 9af37f864688..ac5a72a299a3 100644
--- a/fs/cifs/misc.c
+++ b/fs/cifs/misc.c
@@ -161,6 +161,9 @@ cifs_buf_get(void)
if (ret_buf) {
memset(ret_buf, 0, sizeof(struct smb_hdr) + 3);
atomic_inc(&bufAllocCount);
+#ifdef CONFIG_CIFS_STATS2
+ atomic_inc(&totBufAllocCount);
+#endif /* CONFIG_CIFS_STATS2 */
}
return ret_buf;
@@ -195,6 +198,10 @@ cifs_small_buf_get(void)
/* No need to clear memory here, cleared in header assemble */
/* memset(ret_buf, 0, sizeof(struct smb_hdr) + 27);*/
atomic_inc(&smBufAllocCount);
+#ifdef CONFIG_CIFS_STATS2
+ atomic_inc(&totSmBufAllocCount);
+#endif /* CONFIG_CIFS_STATS2 */
+
}
return ret_buf;
}