Commit 4d078eba authored by Steve French's avatar Steve French Committed by Steve French

fix rc mapping on out of memory on mid alloc failure and cleanup dead code

parent 7713cd04
......@@ -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.
......
......@@ -34,9 +34,14 @@
/*
* 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 */
......@@ -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) {
......
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