diff options
Diffstat (limited to 'fs/cifs/cifs_debug.c')
-rw-r--r-- | fs/cifs/cifs_debug.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c index 22a444a3fe4c..6f5d81f5eacb 100644 --- a/fs/cifs/cifs_debug.c +++ b/fs/cifs/cifs_debug.c | |||
@@ -219,6 +219,10 @@ cifs_stats_write(struct file *file, const char __user *buffer, | |||
219 | 219 | ||
220 | if (c == '1' || c == 'y' || c == 'Y' || c == '0') { | 220 | if (c == '1' || c == 'y' || c == 'Y' || c == '0') { |
221 | read_lock(&GlobalSMBSeslock); | 221 | read_lock(&GlobalSMBSeslock); |
222 | #ifdef CONFIG_CIFS_STATS2 | ||
223 | atomic_set(&totBufAllocCount, 0); | ||
224 | atomic_set(&totSmBufAllocCount, 0); | ||
225 | #endif /* CONFIG_CIFS_STATS2 */ | ||
222 | list_for_each(tmp, &GlobalTreeConnectionList) { | 226 | list_for_each(tmp, &GlobalTreeConnectionList) { |
223 | tcon = list_entry(tmp, struct cifsTconInfo, | 227 | tcon = list_entry(tmp, struct cifsTconInfo, |
224 | cifsConnectionList); | 228 | cifsConnectionList); |
@@ -276,6 +280,14 @@ cifs_stats_read(char *buf, char **beginBuffer, off_t offset, | |||
276 | smBufAllocCount.counter,cifs_min_small); | 280 | smBufAllocCount.counter,cifs_min_small); |
277 | length += item_length; | 281 | length += item_length; |
278 | buf += item_length; | 282 | buf += item_length; |
283 | #ifdef CONFIG_CIFS_STATS2 | ||
284 | item_length = sprintf(buf, "Total Large %d Small %d Allocations\n", | ||
285 | atomic_read(&totBufAllocCount), | ||
286 | atomic_read(&totSmBufAllocCount)); | ||
287 | length += item_length; | ||
288 | buf += item_length; | ||
289 | #endif /* CONFIG_CIFS_STATS2 */ | ||
290 | |||
279 | item_length = | 291 | item_length = |
280 | sprintf(buf,"Operations (MIDs): %d\n", | 292 | sprintf(buf,"Operations (MIDs): %d\n", |
281 | midCount.counter); | 293 | midCount.counter); |