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
42dbb05a
Commit
42dbb05a
authored
Nov 03, 2003
by
Steve French
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://cifs.bkbits.net/linux-2.5cifs
into stevef95.austin.ibm.com:/home/stevef/bk/linux-2.5cifs
parents
a6f63f7a
b84d18a6
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
9 deletions
+37
-9
fs/cifs/cifsfs.c
fs/cifs/cifsfs.c
+1
-1
fs/cifs/cifsglob.h
fs/cifs/cifsglob.h
+1
-0
fs/cifs/connect.c
fs/cifs/connect.c
+19
-0
fs/cifs/file.c
fs/cifs/file.c
+7
-4
fs/cifs/transport.c
fs/cifs/transport.c
+9
-4
No files found.
fs/cifs/cifsfs.c
View file @
42dbb05a
...
...
@@ -583,7 +583,7 @@ static int cifs_oplock_thread(void * dummyarg)
do
{
set_current_state
(
TASK_INTERRUPTIBLE
);
schedule_timeout
(
39
*
HZ
);
schedule_timeout
(
1
);
spin_lock
(
&
GlobalMid_Lock
);
if
(
list_empty
(
&
GlobalOplock_Q
))
{
spin_unlock
(
&
GlobalMid_Lock
);
...
...
fs/cifs/cifsglob.h
View file @
42dbb05a
...
...
@@ -274,6 +274,7 @@ struct oplock_q_entry {
#define MID_REQUEST_ALLOCATED 1
#define MID_REQUEST_SUBMITTED 2
#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 */
...
...
fs/cifs/connect.c
View file @
42dbb05a
...
...
@@ -84,6 +84,7 @@ cifs_reconnect(struct TCP_Server_Info *server)
struct
list_head
*
tmp
;
struct
cifsSesInfo
*
ses
;
struct
cifsTconInfo
*
tcon
;
struct
mid_q_entry
*
mid_entry
;
if
(
server
->
tcpStatus
==
CifsExiting
)
return
rc
;
...
...
@@ -123,6 +124,23 @@ cifs_reconnect(struct TCP_Server_Info *server)
server
->
ssocket
=
NULL
;
}
spin_lock
(
&
GlobalMid_Lock
);
list_for_each
(
tmp
,
&
server
->
pending_mid_q
)
{
mid_entry
=
list_entry
(
tmp
,
struct
mid_q_entry
,
qhead
);
if
(
mid_entry
)
{
if
(
mid_entry
->
midState
==
MID_REQUEST_SUBMITTED
)
{
/* Mark other intransit requests as needing retry so
we do not immediately mark the session bad again
(ie after we reconnect below) as they timeout too */
mid_entry
->
midState
=
MID_RETRY_NEEDED
;
}
}
}
spin_unlock
(
&
GlobalMid_Lock
);
while
((
server
->
tcpStatus
!=
CifsExiting
)
&&
(
server
->
tcpStatus
!=
CifsGood
))
{
rc
=
ipv4_connect
(
&
server
->
sockAddr
,
&
server
->
ssocket
);
...
...
@@ -193,6 +211,7 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server)
}
else
if
(
server
->
tcpStatus
==
CifsNeedReconnect
)
{
cFYI
(
1
,(
"Reconnecting after server stopped responding"
));
cifs_reconnect
(
server
);
cFYI
(
1
,(
"call to reconnect done"
));
csocket
=
server
->
ssocket
;
continue
;
}
else
if
((
length
==
-
ERESTARTSYS
)
||
(
length
==
-
EAGAIN
))
{
...
...
fs/cifs/file.c
View file @
42dbb05a
...
...
@@ -222,6 +222,9 @@ static int cifs_reopen_file(struct inode *inode, struct file *file)
__u16
netfid
;
FILE_ALL_INFO
*
buf
=
NULL
;
if
(
inode
==
NULL
)
return
-
EBADF
;
xid
=
GetXid
();
cifs_sb
=
CIFS_SB
(
inode
->
i_sb
);
...
...
@@ -339,10 +342,10 @@ int reopen_files(struct cifsTconInfo * pTcon, struct nls_table * nlsinfo)
rc
=
cifs_reopen_file
(
file
->
f_dentry
->
d_inode
,
file
);
write_lock
(
&
GlobalSMBSeslock
);
if
(
file
->
private_data
==
NULL
)
{
tmp
=
invalid_file_list
.
next
;
tmp1
=
tmp
->
next
;
continue
;
}
tmp
=
invalid_file_list
.
next
;
tmp1
=
tmp
->
next
;
continue
;
}
list_move
(
&
open_file
->
tlist
,
&
pTcon
->
openFileList
);
if
(
rc
)
{
...
...
fs/cifs/transport.c
View file @
42dbb05a
...
...
@@ -190,6 +190,7 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses,
long
timeout
;
struct
mid_q_entry
*
midQ
;
cifs_dead_ses_retry:
midQ
=
AllocMidQEntry
(
in_buf
,
ses
);
if
(
midQ
==
NULL
)
return
-
EIO
;
...
...
@@ -201,10 +202,10 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses,
return
-
EIO
;
}
if
(
in_buf
->
smb_buf_length
>
12
)
in_buf
->
Flags2
=
cpu_to_le16
(
in_buf
->
Flags2
);
if
(
in_buf
->
smb_buf_length
>
12
)
in_buf
->
Flags2
=
cpu_to_le16
(
in_buf
->
Flags2
);
rc
=
cifs_sign_smb
(
in_buf
,
ses
,
&
midQ
->
sequence_number
);
rc
=
cifs_sign_smb
(
in_buf
,
ses
,
&
midQ
->
sequence_number
);
midQ
->
midState
=
MID_REQUEST_SUBMITTED
;
rc
=
smb_send
(
ses
->
server
->
ssocket
,
in_buf
,
in_buf
->
smb_buf_length
,
...
...
@@ -236,8 +237,12 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses,
be32_to_cpu
(
midQ
->
resp_buf
->
smb_buf_length
);
else
{
cFYI
(
1
,(
"No response buffer"
));
if
(
midQ
->
midState
!=
MID_RETRY_NEEDED
)
{
ses
->
server
->
tcpStatus
=
CifsNeedReconnect
;
DeleteMidQEntry
(
midQ
);
goto
cifs_dead_ses_retry
;
}
DeleteMidQEntry
(
midQ
);
ses
->
server
->
tcpStatus
=
CifsNeedReconnect
;
return
-
EIO
;
}
}
...
...
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