Commit 1c748cf1 authored by Steve French's avatar Steve French

Fix typo in name of CIFS Kconfig option and add rename stats

parent c208b35c
...@@ -1595,7 +1595,7 @@ config CIFS_STATS ...@@ -1595,7 +1595,7 @@ config CIFS_STATS
mounted by the cifs client to be displayed in /proc/fs/cifs/Stats mounted by the cifs client to be displayed in /proc/fs/cifs/Stats
config CIFS_POSIX config CIFS_POSIX
bool "CIFS statistics (EXPERIMENTAL)" bool "CIFS POSIX Extensions (EXPERIMENTAL)"
depends on CIFS depends on CIFS
help help
Enabling this option will cause the cifs client to attempt to Enabling this option will cause the cifs client to attempt to
......
...@@ -108,7 +108,7 @@ cifs_debug_data_read(char *buf, char **beginBuffer, off_t offset, ...@@ -108,7 +108,7 @@ cifs_debug_data_read(char *buf, char **beginBuffer, off_t offset,
mid_q_entry, mid_q_entry,
qhead); qhead);
if(mid_entry) { if(mid_entry) {
length = sprintf(buf,"State: %d com: %d pid: %d tsk: %p\n",mid_entry->midState,mid_entry->command,mid_entry->pid,mid_entry->tsk); length = sprintf(buf,"State: %d com: %d pid: %d tsk: %p mid %d\n",mid_entry->midState,mid_entry->command,mid_entry->pid,mid_entry->tsk,mid_entry->mid);
buf += length; buf += length;
} }
} }
...@@ -259,6 +259,12 @@ cifs_stats_read(char *buf, char **beginBuffer, off_t offset, ...@@ -259,6 +259,12 @@ cifs_stats_read(char *buf, char **beginBuffer, off_t offset,
atomic_read(&tcon->num_rmdirs)); atomic_read(&tcon->num_rmdirs));
buf += item_length; buf += item_length;
length += item_length; length += item_length;
item_length = sprintf(buf,
"\nRenames: %d T2 Renames %d",
atomic_read(&tcon->num_renames),
atomic_read(&tcon->num_t2renames));
buf += item_length;
length += item_length;
} }
read_unlock(&GlobalSMBSeslock); read_unlock(&GlobalSMBSeslock);
......
...@@ -211,6 +211,8 @@ struct cifsTconInfo { ...@@ -211,6 +211,8 @@ struct cifsTconInfo {
atomic_t num_deletes; atomic_t num_deletes;
atomic_t num_mkdirs; atomic_t num_mkdirs;
atomic_t num_rmdirs; atomic_t num_rmdirs;
atomic_t num_renames;
atomic_t num_t2renames;
__u64 bytes_read; __u64 bytes_read;
__u64 bytes_written; __u64 bytes_written;
spinlock_t stat_lock; spinlock_t stat_lock;
......
...@@ -941,7 +941,14 @@ CIFSSMBRename(const int xid, struct cifsTconInfo *tcon, ...@@ -941,7 +941,14 @@ CIFSSMBRename(const int xid, struct cifsTconInfo *tcon,
(struct smb_hdr *) pSMBr, &bytes_returned, 0); (struct smb_hdr *) pSMBr, &bytes_returned, 0);
if (rc) { if (rc) {
cFYI(1, ("Send error in rename = %d", rc)); cFYI(1, ("Send error in rename = %d", rc));
}
#ifdef CONFIG_CIFS_STATS
else {
atomic_inc(&tcon->num_renames);
} }
#endif
if (pSMB) if (pSMB)
cifs_buf_release(pSMB); cifs_buf_release(pSMB);
...@@ -1017,7 +1024,11 @@ int CIFSSMBRenameOpenFile(const int xid,struct cifsTconInfo *pTcon, ...@@ -1017,7 +1024,11 @@ int CIFSSMBRenameOpenFile(const int xid,struct cifsTconInfo *pTcon,
if (rc) { if (rc) {
cFYI(1,("Send error in Rename (by file handle) = %d", rc)); cFYI(1,("Send error in Rename (by file handle) = %d", rc));
} }
#ifdef CONFIG_CIFS_STATS
else {
atomic_inc(&pTcon->num_t2renames);
}
#endif
if (pSMB) if (pSMB)
cifs_buf_release(pSMB); cifs_buf_release(pSMB);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment