]> git.hungrycats.org Git - linux/commitdiff
fix rc mapping on out of memory on mid alloc failure and cleanup dead code
authorSteve French <stevef@smfhome1.smfsambadom>
Thu, 27 May 2004 17:38:22 +0000 (12:38 -0500)
committerSteve French <stevef@smfhome.smfdom>
Thu, 27 May 2004 17:38:22 +0000 (12:38 -0500)
fs/cifs/README
fs/cifs/cifsglob.h
fs/cifs/transport.c

index dc61d8bf1c94034d6541ba6d94c7f5112894170b..8dba57f948e4d2e538f81484ca6b6019432bae06 100644 (file)
@@ -268,6 +268,8 @@ Misc /proc/fs/cifs Flags and Debug Info
 =======================================
 Informational pseudo-files:
 DebugData              Displays information about active CIFS sessions
+                       as well as per share statistics (if CONFIG_CIFS_STATS
+                       is enabled in the kernel configuration).
 SimultaneousOps                Counter which holds maximum number of
                        simultaneous outstanding SMB/CIFS requests.
 Stats                  Lists summary resource usage information
@@ -324,13 +326,25 @@ and for more extensive tracing including the start of smb requests and responses
 Three other experimental features are under development and to test 
 require enabling an ifdef (e.g. by  adding "#define CIFS_FCNTL" in cifsglob.h)
 
-       CIFS_QUOTA
+       CONFIG_CIFS_QUOTA
 
-       CIFS_XATTR
+       CONFIG_CIFS_XATTR
 
-       CIFS_FCNTL  (fcntl needed for support of directory change notification)
+       CONFIG_CIFS_FCNTL  (fcntl needed for support of directory change 
+                           notification and perhaps later for file leases)
+
+Per share (per client mount) statistics are available in /proc/fs/cifs/DebugData
+if the kernel was configured with cifs statistics enabled.  The statistics
+represent the number of successful (ie non-zero return code from the server) 
+SMB responses to some of the more common commands (open, delete, mkdir etc.).
+Also recorded is the total bytes read and bytes written to the server for
+that share.  Note that due to client caching effects this can be less than the
+number of bytes read and written by the application running on the client.
+The statistics for the number of total SMBs and oplock breaks are different in
+that they represent all for that share, not just those for which the server
+returned success.
        
-Also note that "cat /proc/fs/cifs/DebugData" will display some information about 
+Also note that "cat /proc/fs/cifs/DebugData" will display information about 
 the active sessions and the shares that are mounted.  Note: NTLMv2 enablement 
 will not work since they its implementation is not quite complete yet.
 Do not alter these configuration values unless you are doing specific testing.  
index 2066dbf9c1b5c17b0ad309f7dd021786c03dd01a..427d9c9d56361afceb3e235895d7b4e1ebb6ef12 100644 (file)
 
 /*
  * MAX_REQ is the maximum number of requests that WE will send
- * on one NetBIOS handle concurently.
+ * on one socket concurently. It also matches the most common
+ * value of max multiplex returned by servers.  We may 
+ * eventually want to use the negotiated value (in case
+ * future servers can handle more) when we are more confident that
+ * we will not have problems oveloading the socket with pending
+ * write data.
  */
-#define MAX_REQ (10)
+#define CIFS_MAX_REQ 50 
 
 #define SERVER_NAME_LENGTH 15
 #define SERVER_NAME_LEN_WITH_NULL     (SERVER_NAME_LENGTH + 1)
@@ -309,13 +314,6 @@ struct oplock_q_entry {
 #define   MID_RESPONSE_RECEIVED 4
 #define   MID_RETRY_NEEDED      8 /* session closed while this request out */
 
-struct servers_not_supported { /* @z4a */
-       struct servers_not_supported *next1;  /* @z4a */
-       char server_Name[SERVER_NAME_LEN_WITH_NULL]; /* @z4a */
-       /* Server Names in SMB protocol are 15 chars + X'20'  */
-       /*   in 16th byte...                      @z4a        */
-};
-
 /*
  *****************************************************************
  * All constants go here
@@ -413,4 +411,3 @@ GLOBAL_EXTERN unsigned int ntlmv2_support;  /* better optional password hash */
 GLOBAL_EXTERN unsigned int sign_CIFS_PDUs;  /* enable smb packet signing */
 GLOBAL_EXTERN unsigned int linuxExtEnabled;  /* enable Linux/Unix CIFS extensions */
 
-
index 843d6e1a3c57c14b29077014e0d2c9aa3b9864d6..c55118c58eeb0f159c3f31fc3116480a16ae2a7d 100644 (file)
@@ -202,8 +202,8 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses,
                atomic_inc(&ses->server->inFlight); 
        }
  
-       if(atomic_read(&ses->server->inFlight) > 50) {
-               wait_event(ses->server->request_q,atomic_read(&ses->server->inFlight) <= 50);
+       if(atomic_read(&ses->server->inFlight) > CIFS_MAX_REQ) {
+               wait_event(ses->server->request_q,atomic_read(&ses->server->inFlight) <= CIFS_MAX_REQ);
        }
 
        /* make sure that we sign in the same order that we send on this socket 
@@ -235,7 +235,7 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses,
                        atomic_dec(&ses->server->inFlight); 
                        wake_up(&ses->server->request_q);
                }
-               return -EIO;
+               return -ENOMEM;
        }
 
        if (in_buf->smb_buf_length > CIFS_MAX_MSGSIZE + MAX_CIFS_HDR_SIZE - 4) {