From dfb7533b5f157ac7135da23883e80d895227d965 Mon Sep 17 00:00:00 2001 From: Steve French Date: Wed, 22 Jun 2005 17:13:47 -0700 Subject: [CIFS] Add stats for findfirst, findnext, findclose Signed-off-by: Steve French (sfrench@us.ibm.com) --- fs/cifs/cifssmb.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'fs/cifs/cifssmb.c') diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index 3c628bf667a..b31158a2643 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c @@ -2396,7 +2396,9 @@ findUniqueRetry: if (rc) { cFYI(1, ("Send error in FindFileDirInfo = %d", rc)); } else { /* decode response */ - +#ifdef CONFIG_CIFS_STATS + atomic_inc(&tcon->num_ffirst); +#endif /* BB fill in */ } @@ -2509,6 +2511,9 @@ findFirstRetry: if (rc == -EAGAIN) goto findFirstRetry; } else { /* decode response */ +#ifdef CONFIG_CIFS_STATS + atomic_inc(&tcon->num_ffirst); +#endif /* BB remember to free buffer if error BB */ rc = validate_t2((struct smb_t2_rsp *)pSMBr); if(rc == 0) { @@ -2622,6 +2627,9 @@ int CIFSFindNext(const int xid, struct cifsTconInfo *tcon, } else cFYI(1, ("FindNext returned = %d", rc)); } else { /* decode response */ +#ifdef CONFIG_CIFS_STATS + atomic_inc(&tcon->num_fnext); +#endif rc = validate_t2((struct smb_t2_rsp *)pSMBr); if(rc == 0) { @@ -2691,6 +2699,9 @@ CIFSFindClose(const int xid, struct cifsTconInfo *tcon, const __u16 searchHandle if (rc) { cERROR(1, ("Send error in FindClose = %d", rc)); } +#ifdef CONFIG_CIFS_STATS + atomic_inc(&tcon->num_fclose); +#endif cifs_small_buf_release(pSMB); /* Since session is dead, search handle closed on server already */ -- cgit v1.2.3