diff options
author | Steve French <sfrench@us.ibm.com> | 2005-08-21 00:42:53 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2005-08-21 00:42:53 -0400 |
commit | a5a2b489bae8f66559a531df99a26eb16b42299e (patch) | |
tree | 080a579fe5e5382dc3493e302174b9c584964be4 /fs/cifs/file.c | |
parent | 646352319b6cd369750a706706810d87f6b6efa7 (diff) |
[CIFS] Make CIFS statistics more accurate and add some stats that were
missing. Most importantly SMB reads were undercounted.
Signed-off-by: Steve French (sfrench@us.ibm.com)
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r-- | fs/cifs/file.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index ddb25a0a63d5..b054df2dee1e 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
@@ -746,7 +746,6 @@ ssize_t cifs_user_write(struct file *file, const char __user *write_data, | |||
746 | 746 | ||
747 | #ifdef CONFIG_CIFS_STATS | 747 | #ifdef CONFIG_CIFS_STATS |
748 | if (total_written > 0) { | 748 | if (total_written > 0) { |
749 | atomic_inc(&pTcon->num_writes); | ||
750 | spin_lock(&pTcon->stat_lock); | 749 | spin_lock(&pTcon->stat_lock); |
751 | pTcon->bytes_written += total_written; | 750 | pTcon->bytes_written += total_written; |
752 | spin_unlock(&pTcon->stat_lock); | 751 | spin_unlock(&pTcon->stat_lock); |
@@ -881,7 +880,6 @@ static ssize_t cifs_write(struct file *file, const char *write_data, | |||
881 | 880 | ||
882 | #ifdef CONFIG_CIFS_STATS | 881 | #ifdef CONFIG_CIFS_STATS |
883 | if (total_written > 0) { | 882 | if (total_written > 0) { |
884 | atomic_inc(&pTcon->num_writes); | ||
885 | spin_lock(&pTcon->stat_lock); | 883 | spin_lock(&pTcon->stat_lock); |
886 | pTcon->bytes_written += total_written; | 884 | pTcon->bytes_written += total_written; |
887 | spin_unlock(&pTcon->stat_lock); | 885 | spin_unlock(&pTcon->stat_lock); |
@@ -1248,7 +1246,6 @@ ssize_t cifs_user_read(struct file *file, char __user *read_data, | |||
1248 | } | 1246 | } |
1249 | } else { | 1247 | } else { |
1250 | #ifdef CONFIG_CIFS_STATS | 1248 | #ifdef CONFIG_CIFS_STATS |
1251 | atomic_inc(&pTcon->num_reads); | ||
1252 | spin_lock(&pTcon->stat_lock); | 1249 | spin_lock(&pTcon->stat_lock); |
1253 | pTcon->bytes_read += total_read; | 1250 | pTcon->bytes_read += total_read; |
1254 | spin_unlock(&pTcon->stat_lock); | 1251 | spin_unlock(&pTcon->stat_lock); |
@@ -1316,7 +1313,6 @@ static ssize_t cifs_read(struct file *file, char *read_data, size_t read_size, | |||
1316 | } | 1313 | } |
1317 | } else { | 1314 | } else { |
1318 | #ifdef CONFIG_CIFS_STATS | 1315 | #ifdef CONFIG_CIFS_STATS |
1319 | atomic_inc(&pTcon->num_reads); | ||
1320 | spin_lock(&pTcon->stat_lock); | 1316 | spin_lock(&pTcon->stat_lock); |
1321 | pTcon->bytes_read += total_read; | 1317 | pTcon->bytes_read += total_read; |
1322 | spin_unlock(&pTcon->stat_lock); | 1318 | spin_unlock(&pTcon->stat_lock); |
@@ -1493,7 +1489,6 @@ static int cifs_readpages(struct file *file, struct address_space *mapping, | |||
1493 | 1489 | ||
1494 | i += bytes_read >> PAGE_CACHE_SHIFT; | 1490 | i += bytes_read >> PAGE_CACHE_SHIFT; |
1495 | #ifdef CONFIG_CIFS_STATS | 1491 | #ifdef CONFIG_CIFS_STATS |
1496 | atomic_inc(&pTcon->num_reads); | ||
1497 | spin_lock(&pTcon->stat_lock); | 1492 | spin_lock(&pTcon->stat_lock); |
1498 | pTcon->bytes_read += bytes_read; | 1493 | pTcon->bytes_read += bytes_read; |
1499 | spin_unlock(&pTcon->stat_lock); | 1494 | spin_unlock(&pTcon->stat_lock); |