Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
ae68d0de
Commit
ae68d0de
authored
Jun 16, 2004
by
Steve French
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix throttle to limit number of requests to 50 on wire to server at one time.
Signed-off-by: Steve French (sfrench@us.ibm.com)
parent
81a50e44
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
13 deletions
+20
-13
fs/cifs/transport.c
fs/cifs/transport.c
+20
-13
No files found.
fs/cifs/transport.c
View file @
ae68d0de
...
...
@@ -200,23 +200,30 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses,
}
/* Ensure that we do not send more than 50 overlapping requests
to the same server. We may make this configurable later or
use ses->maxReq */
to the same server. We may make this configurable later or
use ses->maxReq */
/* can not count locking commands against the total since
they are allowed to block on server */
if
(
long_op
<
3
)
{
/* update # of requests on the wire to this server */
atomic_inc
(
&
ses
->
server
->
inFlight
);
}
if
(
atomic_read
(
&
ses
->
server
->
inFlight
)
>
CIFS_MAX_REQ
)
{
wait_event
(
ses
->
server
->
request_q
,
atomic_read
(
&
ses
->
server
->
inFlight
)
<=
CIFS_MAX_REQ
);
spin_lock
(
&
GlobalMid_Lock
);
while
(
1
)
{
if
(
atomic_read
(
&
ses
->
server
->
inFlight
)
>=
CIFS_MAX_REQ
)
{
spin_unlock
(
&
GlobalMid_Lock
);
wait_event
(
ses
->
server
->
request_q
,
atomic_read
(
&
ses
->
server
->
inFlight
)
<
CIFS_MAX_REQ
);
spin_lock
(
&
GlobalMid_Lock
);
}
else
{
/* can not count locking commands against the total since
they are allowed to block on server */
if
(
long_op
<
3
)
{
/* update # of requests on the wire to this server */
atomic_inc
(
&
ses
->
server
->
inFlight
);
}
spin_unlock
(
&
GlobalMid_Lock
);
break
;
}
}
/* make sure that we sign in the same order that we send on this socket
and avoid races inside tcp sendmsg code that could cause corruption
of smb data */
and avoid races inside tcp sendmsg code that could cause corruption
of smb data */
down
(
&
ses
->
server
->
tcpSem
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment