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
Show 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
...
...
@@ -203,15 +203,22 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses,
to the same server. We may make this configurable later or
use ses->maxReq */
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
);
}
if
(
atomic_read
(
&
ses
->
server
->
inFlight
)
>
CIFS_MAX_REQ
)
{
wait_event
(
ses
->
server
->
request_q
,
atomic_read
(
&
ses
->
server
->
inFlight
)
<=
CIFS_MAX_REQ
);
spin_unlock
(
&
GlobalMid_Lock
);
break
;
}
}
/* make sure that we sign in the same order that we send on this socket
...
...
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